Updating neovim configuration
This commit is contained in:
parent
8459e26e3f
commit
caa5c24146
@ -1,5 +1,5 @@
|
|||||||
return {
|
return {
|
||||||
'windwp/nvim-autopairs',
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
opts = {} -- this is equalent to setup({}) function
|
opts = {}, -- this is equalent to setup({}) function
|
||||||
}
|
}
|
||||||
|
@ -1,47 +1,47 @@
|
|||||||
return {
|
return {
|
||||||
"numToStr/Comment.nvim",
|
"numToStr/Comment.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
---Add a space b/w comment and the line
|
---Add a space b/w comment and the line
|
||||||
padding = true,
|
padding = true,
|
||||||
---Whether the cursor should stay at its position
|
---Whether the cursor should stay at its position
|
||||||
sticky = true,
|
sticky = true,
|
||||||
---Lines to be ignored while (un)comment
|
---Lines to be ignored while (un)comment
|
||||||
ignore = nil,
|
ignore = nil,
|
||||||
---LHS of toggle mappings in NORMAL mode
|
---LHS of toggle mappings in NORMAL mode
|
||||||
toggler = {
|
toggler = {
|
||||||
---Line-comment toggle keymap
|
---Line-comment toggle keymap
|
||||||
line = "gcc",
|
line = "gcc",
|
||||||
---Block-comment toggle keymap
|
---Block-comment toggle keymap
|
||||||
block = "gcc",
|
block = "gcc",
|
||||||
},
|
},
|
||||||
---LHS of operator-pending mappings in NORMAL and VISUAL mode
|
---LHS of operator-pending mappings in NORMAL and VISUAL mode
|
||||||
opleader = {
|
opleader = {
|
||||||
---Line-comment keymap
|
---Line-comment keymap
|
||||||
line = "gc",
|
line = "gc",
|
||||||
---Block-comment keymap
|
---Block-comment keymap
|
||||||
block = "gb",
|
block = "gb",
|
||||||
},
|
},
|
||||||
---LHS of extra mappings
|
---LHS of extra mappings
|
||||||
extra = {
|
extra = {
|
||||||
---Add comment on the line above
|
---Add comment on the line above
|
||||||
above = "gcO",
|
above = "gcO",
|
||||||
---Add comment on the line below
|
---Add comment on the line below
|
||||||
below = "gco",
|
below = "gco",
|
||||||
---Add comment at the end of line
|
---Add comment at the end of line
|
||||||
eol = "gcA",
|
eol = "gcA",
|
||||||
},
|
},
|
||||||
---Enable keybindings
|
---Enable keybindings
|
||||||
---NOTE: If given `false` then the plugin won't create any mappings
|
---NOTE: If given `false` then the plugin won't create any mappings
|
||||||
mappings = {
|
mappings = {
|
||||||
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||||
basic = true,
|
basic = true,
|
||||||
---Extra mapping; `gco`, `gcO`, `gcA`
|
---Extra mapping; `gco`, `gcO`, `gcA`
|
||||||
extra = true,
|
extra = true,
|
||||||
},
|
},
|
||||||
---Function to call before (un)comment
|
---Function to call before (un)comment
|
||||||
pre_hook = nil,
|
pre_hook = nil,
|
||||||
---Function to call after (un)comment
|
---Function to call after (un)comment
|
||||||
post_hook = nil,
|
post_hook = nil,
|
||||||
},
|
},
|
||||||
lazy = false,
|
lazy = false,
|
||||||
}
|
}
|
||||||
|
@ -1,35 +1,35 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = { "lua_ls", "texlab", "clangd", "pylsp" },
|
ensure_installed = { "lua_ls", "texlab", "clangd", "pylsp" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
config = function()
|
config = function()
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
lspconfig.lua_ls.setup({
|
lspconfig.lua_ls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
lspconfig.texlab.setup({
|
lspconfig.texlab.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
lspconfig.clangd.setup({
|
lspconfig.clangd.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
lspconfig.pylsp.setup({
|
lspconfig.pylsp.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
'nvim-lualine/lualine.nvim',
|
"nvim-lualine/lualine.nvim",
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
config = function()
|
config = function()
|
||||||
require('lualine').setup()
|
require("lualine").setup()
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v3.x",
|
branch = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
vim.keymap.set("n", '<leader>n',":Neotree toggle<CR>",{})
|
vim.keymap.set("n", "<leader>n", ":Neotree toggle<CR>", {})
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
return {
|
return {
|
||||||
"nvimtools/none-ls.nvim",
|
"nvimtools/none-ls.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.formatting.stylua,
|
null_ls.builtins.formatting.stylua,
|
||||||
null_ls.builtins.formatting.black,
|
null_ls.builtins.formatting.black,
|
||||||
null_ls.builtins.formatting.isort,
|
null_ls.builtins.formatting.isort,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
return {
|
return {
|
||||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
tag = "0.1.5",
|
||||||
config= function()
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
local builtin = require("telescope.builtin")
|
config = function()
|
||||||
vim.keymap.set("n", '<C-p>',builtin.find_files,{})
|
local builtin = require("telescope.builtin")
|
||||||
vim.keymap.set("n", '<leader>fg',builtin.live_grep,{})
|
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
||||||
end
|
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
||||||
}
|
end,
|
||||||
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
return {
|
return {
|
||||||
"lervag/vimtex",
|
"lervag/vimtex",
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.vimtex_view_general_viewer = 'zathura'
|
vim.g.vimtex_view_general_viewer = "zathura"
|
||||||
vim.g.vimtex_view_automatic = 1
|
vim.g.vimtex_view_automatic = 1
|
||||||
vim.keymap.set('n','<leader>ll',':VimtexCompile<CR>')
|
vim.keymap.set("n", "<leader>ll", ":VimtexCompile<CR>")
|
||||||
vim.keymap.set('n','<leader>lv',':VimtexView<CR>')
|
vim.keymap.set("n", "<leader>lv", ":VimtexView<CR>")
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
@ -3,5 +3,3 @@ vim.cmd("set tabstop=2")
|
|||||||
vim.cmd("set softtabstop=2")
|
vim.cmd("set softtabstop=2")
|
||||||
vim.cmd("set shiftwidth=2")
|
vim.cmd("set shiftwidth=2")
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user