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>
iGor milhit 2025-12-17 07:41:30 +01:00
parent be776d2896
commit 21bb2a4393
Signed by: igor
GPG Key ID: 692D97C3D0228A99
6 changed files with 15 additions and 39 deletions

View File

@ -2,7 +2,7 @@
-- Use treesitter for folding
-- Disable the color column
vim.opt.foldmethod="expr"
vim.opt.foldexpr="nvim_treesitter#foldexpr()"
vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
vim.wo[0][0].foldmethod = 'expr'
vim.opt.foldlevel=3
vim.opt.colorcolumn=""

View File

@ -33,7 +33,7 @@ local highlight_group = vim.api.nvim_create_augroup(
)
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
vim.highlight.on_yank()
vim.hl.on_yank()
end,
group = highlight_group,
pattern = '*',

View File

@ -9,7 +9,7 @@ return {
-- Adds code actions, such as smart file renaming, etc
{ "antosha417/nvim-lsp-file-operations", config = true },
-- 💫 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()
-- Import lsp-zero

View File

@ -2,9 +2,9 @@
-- LSP
return {
"williamboman/mason.nvim",
"mason-org/mason.nvim",
dependencies = {
"williamboman/mason-lspconfig.nvim",
"mason-org/mason-lspconfig.nvim",
"WhoIsSethDaniel/mason-tool-installer.nvim",
},
config = function()
@ -15,9 +15,11 @@ return {
local mason_lspconfig = require("mason-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
local mason_tool_installer = require("mason-tool-installer")
@ -35,8 +37,6 @@ return {
mason_tool_installer.setup({
ensure_installed = {
"black",
"isort",
"prettier",
"stylua",
"tree-sitter-cli",
@ -54,7 +54,7 @@ return {
"jsonls",
"lua_ls",
"marksman",
"pylsp",
"ruff",
"yamlls",
},
handlers = {
@ -76,19 +76,9 @@ return {
-- The first one is the mason_lspconfig key, the seconde one is the
-- lspconfig key. They are identical to the ensure_installed entries.
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#pylsp
pylsp = function()
lspconfig.pylsp.setup({
settings = {
pylsp = {
plugins = {
pyflakes = { enabled = false },
pycodestyle = {
enabled = true,
ignore = { "E501" },
},
},
},
ruff = function()
lspconfig.ruff.setup({
setting = {
},
})
end,

View File

@ -1,19 +1,5 @@
-- 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(
'n',
'<leader>e',

View File

@ -3,7 +3,7 @@
return {
'linux-cultist/venv-selector.nvim',
branch = 'regexp',
-- branch = 'regexp',
dependencies = {
'neovim/nvim-lspconfig',
'nvim-telescope/telescope.nvim',