nvim lsp deprecation
This commit is contained in:
parent
507d42c837
commit
c980c209f3
@ -36,7 +36,7 @@ local lspstatus = require('lsp-status')
|
||||
lspstatus.register_progress()
|
||||
|
||||
local function find_repo_root(names)
|
||||
local util = require("lspconfig.util")
|
||||
local util = vim.lsp.config.util
|
||||
local config = names.configfiles
|
||||
local function matcher(filename, _bufnr)
|
||||
local gitroot = util.root_pattern('.git')(filename)
|
||||
@ -123,10 +123,10 @@ local lsp_confs = {
|
||||
configfiles = { ".eslintrc", ".eslintrc.js", "package.json" }
|
||||
}),
|
||||
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)
|
||||
|
||||
local util = require('lspconfig.util')
|
||||
local util = vim.lsp.config.util
|
||||
local pnp_cjs = util.path.join(new_root_dir, '.pnp.cjs')
|
||||
local pnp_js = util.path.join(new_root_dir, '.pnp.js')
|
||||
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)
|
||||
end
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
|
||||
for server, conf in pairs(lsp_confs) do
|
||||
local source_on_attach = conf.on_attach
|
||||
@ -171,7 +169,8 @@ for server, conf in pairs(lsp_confs) do
|
||||
if special_setup then
|
||||
special_setup(final_config)
|
||||
else
|
||||
lspconfig[server].setup(final_config)
|
||||
vim.lsp.config[server] = final_config
|
||||
vim.lsp.enable(server)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ local o = vim.opt
|
||||
local map = vim.api.nvim_set_keymap
|
||||
|
||||
vim.g.mapleader = ","
|
||||
vim.g.maplocalleader = ","
|
||||
vim.g.maplocalleader = " "
|
||||
o.modeline = true
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
|
||||
@ -25,6 +25,18 @@ return require('packer').startup({
|
||||
'whonore/Coqtail'
|
||||
}
|
||||
|
||||
use {
|
||||
'Julian/lean.nvim',
|
||||
requires = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
config = function()
|
||||
require("lean").setup({
|
||||
opts = { mappings = true }
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
use {
|
||||
'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 MANPATH=$MANPATH:$HOME/.local/share/texlive/2025/texmf-dist/doc/man
|
||||
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/variables.sh
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user