plugins: fix configurations
- Removes deprecated keybindings for diagnostics. - Removes branch options when installing venv-selector. - Updates options for JSON folding. - Fixes other deprecated options, especially for LSP configuration. - Updates the repository URL for Mason plugings. Co-Authored-by: iGor milhit <igor@milhit.ch>
parent
be776d2896
commit
21bb2a4393
|
|
@ -2,7 +2,7 @@
|
||||||
-- Use treesitter for folding
|
-- Use treesitter for folding
|
||||||
-- Disable the color column
|
-- Disable the color column
|
||||||
|
|
||||||
vim.opt.foldmethod="expr"
|
vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
||||||
vim.opt.foldexpr="nvim_treesitter#foldexpr()"
|
vim.wo[0][0].foldmethod = 'expr'
|
||||||
vim.opt.foldlevel=3
|
vim.opt.foldlevel=3
|
||||||
vim.opt.colorcolumn=""
|
vim.opt.colorcolumn=""
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ local highlight_group = vim.api.nvim_create_augroup(
|
||||||
)
|
)
|
||||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank()
|
vim.hl.on_yank()
|
||||||
end,
|
end,
|
||||||
group = highlight_group,
|
group = highlight_group,
|
||||||
pattern = '*',
|
pattern = '*',
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ return {
|
||||||
-- Adds code actions, such as smart file renaming, etc
|
-- Adds code actions, such as smart file renaming, etc
|
||||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||||
-- 💫 Extensible UI for Neovim notifications and LSP progress messages
|
-- 💫 Extensible UI for Neovim notifications and LSP progress messages
|
||||||
{ 'j-hui/fidget.nvim', tag = "legacy", opts = {} },
|
{ 'j-hui/fidget.nvim', tag = "legacy", opts = {} },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Import lsp-zero
|
-- Import lsp-zero
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
-- LSP
|
-- LSP
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"williamboman/mason.nvim",
|
"mason-org/mason.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"mason-org/mason-lspconfig.nvim",
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
|
@ -15,9 +15,11 @@ return {
|
||||||
local mason_lspconfig = require("mason-lspconfig")
|
local mason_lspconfig = require("mason-lspconfig")
|
||||||
|
|
||||||
-- Import lspconfig
|
-- Import lspconfig
|
||||||
local lspconfig = require("lspconfig")
|
-- local lspconfig = require("lspconfig")
|
||||||
|
local lspconfig = vim.lsp.config
|
||||||
|
|
||||||
local util = require("lspconfig.util")
|
-- local util = require("lspconfig.util")
|
||||||
|
local util = vim.lsp.util
|
||||||
|
|
||||||
-- Import mason-tool-installer
|
-- Import mason-tool-installer
|
||||||
local mason_tool_installer = require("mason-tool-installer")
|
local mason_tool_installer = require("mason-tool-installer")
|
||||||
|
|
@ -35,8 +37,6 @@ return {
|
||||||
|
|
||||||
mason_tool_installer.setup({
|
mason_tool_installer.setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"black",
|
|
||||||
"isort",
|
|
||||||
"prettier",
|
"prettier",
|
||||||
"stylua",
|
"stylua",
|
||||||
"tree-sitter-cli",
|
"tree-sitter-cli",
|
||||||
|
|
@ -54,7 +54,7 @@ return {
|
||||||
"jsonls",
|
"jsonls",
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"marksman",
|
"marksman",
|
||||||
"pylsp",
|
"ruff",
|
||||||
"yamlls",
|
"yamlls",
|
||||||
},
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
|
|
@ -76,19 +76,9 @@ return {
|
||||||
-- The first one is the mason_lspconfig key, the seconde one is the
|
-- The first one is the mason_lspconfig key, the seconde one is the
|
||||||
-- lspconfig key. They are identical to the ensure_installed entries.
|
-- lspconfig key. They are identical to the ensure_installed entries.
|
||||||
|
|
||||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pylsp
|
ruff = function()
|
||||||
pylsp = function()
|
lspconfig.ruff.setup({
|
||||||
lspconfig.pylsp.setup({
|
setting = {
|
||||||
settings = {
|
|
||||||
pylsp = {
|
|
||||||
plugins = {
|
|
||||||
pyflakes = { enabled = false },
|
|
||||||
pycodestyle = {
|
|
||||||
enabled = true,
|
|
||||||
ignore = { "E501" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,5 @@
|
||||||
-- Diagnostic keymaps
|
-- Diagnostic keymaps
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
'n',
|
|
||||||
'[d',
|
|
||||||
vim.diagnostic.goto_prev,
|
|
||||||
{ desc = "[Diagnostic] Go to previous diagnostic message" }
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
'n',
|
|
||||||
']d',
|
|
||||||
vim.diagnostic.goto_next,
|
|
||||||
{ desc = "[Diagnostic] Go to next diagnostic message" }
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
'n',
|
'n',
|
||||||
'<leader>e',
|
'<leader>e',
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'linux-cultist/venv-selector.nvim',
|
'linux-cultist/venv-selector.nvim',
|
||||||
branch = 'regexp',
|
-- branch = 'regexp',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue