nvim lsp deprecation
This commit is contained in:
parent
507d42c837
commit
c980c209f3
@ -36,7 +36,7 @@ local lspstatus = require('lsp-status')
|
|||||||
lspstatus.register_progress()
|
lspstatus.register_progress()
|
||||||
|
|
||||||
local function find_repo_root(names)
|
local function find_repo_root(names)
|
||||||
local util = require("lspconfig.util")
|
local util = vim.lsp.config.util
|
||||||
local config = names.configfiles
|
local config = names.configfiles
|
||||||
local function matcher(filename, _bufnr)
|
local function matcher(filename, _bufnr)
|
||||||
local gitroot = util.root_pattern('.git')(filename)
|
local gitroot = util.root_pattern('.git')(filename)
|
||||||
@ -123,10 +123,10 @@ local lsp_confs = {
|
|||||||
configfiles = { ".eslintrc", ".eslintrc.js", "package.json" }
|
configfiles = { ".eslintrc", ".eslintrc.js", "package.json" }
|
||||||
}),
|
}),
|
||||||
on_new_config = function(config, new_root_dir)
|
on_new_config = function(config, new_root_dir)
|
||||||
local default_config = require('lspconfig.server_configurations.eslint').default_config
|
local default_config = vim.lsp.config.eslint.default_config
|
||||||
default_config.on_new_config(config, new_root_dir)
|
default_config.on_new_config(config, new_root_dir)
|
||||||
|
|
||||||
local util = require('lspconfig.util')
|
local util = vim.lsp.config.util
|
||||||
local pnp_cjs = util.path.join(new_root_dir, '.pnp.cjs')
|
local pnp_cjs = util.path.join(new_root_dir, '.pnp.cjs')
|
||||||
local pnp_js = util.path.join(new_root_dir, '.pnp.js')
|
local pnp_js = util.path.join(new_root_dir, '.pnp.js')
|
||||||
if util.path.exists(pnp_cjs) or util.path.exists(pnp_js) then
|
if util.path.exists(pnp_cjs) or util.path.exists(pnp_js) then
|
||||||
@ -145,8 +145,6 @@ local function on_attach(client, _bufnr)
|
|||||||
lspstatus.on_attach(client)
|
lspstatus.on_attach(client)
|
||||||
end
|
end
|
||||||
|
|
||||||
local lspconfig = require('lspconfig')
|
|
||||||
|
|
||||||
|
|
||||||
for server, conf in pairs(lsp_confs) do
|
for server, conf in pairs(lsp_confs) do
|
||||||
local source_on_attach = conf.on_attach
|
local source_on_attach = conf.on_attach
|
||||||
@ -171,7 +169,8 @@ for server, conf in pairs(lsp_confs) do
|
|||||||
if special_setup then
|
if special_setup then
|
||||||
special_setup(final_config)
|
special_setup(final_config)
|
||||||
else
|
else
|
||||||
lspconfig[server].setup(final_config)
|
vim.lsp.config[server] = final_config
|
||||||
|
vim.lsp.enable(server)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ local o = vim.opt
|
|||||||
local map = vim.api.nvim_set_keymap
|
local map = vim.api.nvim_set_keymap
|
||||||
|
|
||||||
vim.g.mapleader = ","
|
vim.g.mapleader = ","
|
||||||
vim.g.maplocalleader = ","
|
vim.g.maplocalleader = " "
|
||||||
o.modeline = true
|
o.modeline = true
|
||||||
o.number = true
|
o.number = true
|
||||||
o.relativenumber = true
|
o.relativenumber = true
|
||||||
|
|||||||
@ -25,6 +25,18 @@ return require('packer').startup({
|
|||||||
'whonore/Coqtail'
|
'whonore/Coqtail'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use {
|
||||||
|
'Julian/lean.nvim',
|
||||||
|
requires = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("lean").setup({
|
||||||
|
opts = { mappings = true }
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'noir-lang/noir-nvim'
|
'noir-lang/noir-nvim'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
export PATH=$HOME/.config/bin/$(cat /etc/hostname):$HOME/.config/bin:$HOME/.local/bin:$HOME/.local/share/texlive/2025/bin/x86_64-linux:$HOME/.local/share/cargo/bin:/home/emh/.local/share/solana/install/active_release/bin:$HOME/.local/share/npm/bin:$HOME/.nargo:$PATH
|
export PATH=$HOME/.config/bin/$(cat /etc/hostname):$HOME/.config/bin:$HOME/.local/bin:$HOME/.local/share/texlive/2025/bin/x86_64-linux:$HOME/.local/share/cargo/bin:/home/emh/.local/share/solana/install/active_release/bin:$HOME/.local/share/npm/bin:$HOME/.nargo:$PATH
|
||||||
export MANPATH=$MANPATH:$HOME/.local/share/texlive/2025/texmf-dist/doc/man
|
export MANPATH=$MANPATH:$HOME/.local/share/texlive/2025/texmf-dist/doc/man
|
||||||
export INFOPATH=$INFOPATH:$HOME/.local/share/texlive/2025/texmf-dist/doc/info
|
export INFOPATH=$INFOPATH:$HOME/.local/share/texlive/2025/texmf-dist/doc/info
|
||||||
|
export PATH="$PATH:/home/emh/.config/.foundry/bin"
|
||||||
|
|
||||||
. "$HOME"/.cache/theme/colors.sh
|
. "$HOME"/.cache/theme/colors.sh
|
||||||
. "$HOME"/.cache/theme/variables.sh
|
. "$HOME"/.cache/theme/variables.sh
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user