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