new lsp thing

This commit is contained in:
Belal Elsabbagh
2025-05-13 10:03:09 +03:00
parent fce940df13
commit 01ac9df6e4
9 changed files with 76 additions and 1 deletions

View File

@@ -52,6 +52,17 @@ end
vim.opt.rtp:prepend(lazypath)
vim.lsp.config('*', {
capabilities = {
textDocument = {
semanticTokens = {
multilineTokenSupport = true,
},
},
},
root_markers = { '.git' },
})
require('lazy').setup({ spec = { import = 'plugins' } }, {
ui = {
icons = vim.g.have_nerd_font and {} or {

View File

@@ -0,0 +1,18 @@
return {
-- From the clangd configuration in <rtp>/lsp/clangd.lua
cmd = { 'clangd' },
-- From the clangd configuration in <rtp>/lsp/clangd.lua
-- Overrides the "*" configuration in init.lua
root_markers = { '.clangd', 'compile_commands.json' },
-- From the clangd configuration in init.lua
-- Overrides the clangd configuration in <rtp>/lsp/clangd.lua
filetypes = { 'c' },
-- From the "*" configuration in init.lua
capabilities = {
textDocument = {
semanticTokens = {
multilineTokenSupport = true,
},
},
},
}

View File

View File

@@ -0,0 +1,20 @@
return {
cmd = { 'lua-language-server' },
-- Filetypes to automatically attach to.
filetypes = { 'lua' },
-- Sets the "root directory" to the parent directory of the file in the
-- current buffer that contains either a ".luarc.json" or a
-- ".luarc.jsonc" file. Files that share a root directory will reuse
-- the connection to the same LSP server.
root_markers = { '.luarc.json', '.luarc.jsonc' },
-- Specific settings to send to the server. The schema for this is
-- defined by the server. For example the schema for lua-language-server
-- can be found here https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json
settings = {
Lua = {
runtime = {
version = 'LuaJIT',
},
},
},
}

View File

@@ -0,0 +1,20 @@
return {
cmd = { 'pyright' },
filetypes = { 'python' },
root_markers = {
'pyproject.toml',
'setup.py',
'setup.cfg',
'requirements.txt',
'Pipfile',
'pyrightconfig.json',
},
settings = {
python = {
analysis = {
autoSearchPaths = true,
useLibraryCodeForTypes = true,
},
},
},
}

View File

View File