mirror of
https://github.com/harivansh-afk/nvim.git
synced 2026-04-15 09:01:16 +00:00
clean config
This commit is contained in:
parent
1db6db7f92
commit
25aded9685
19 changed files with 468 additions and 852 deletions
|
|
@ -1,32 +1,32 @@
|
|||
local lsp_config = require("config.lsp")
|
||||
local lsp = require('config.lsp')
|
||||
|
||||
vim.lsp.config("*", {
|
||||
capabilities = lsp_config.capabilities(),
|
||||
vim.lsp.config('*', {
|
||||
capabilities = lsp.capabilities(),
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||
if client then
|
||||
lsp_config.on_attach(client, ev.buf)
|
||||
lsp.on_attach(client, ev.buf)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
for _, server in ipairs({
|
||||
"lua_ls",
|
||||
"pyright",
|
||||
"ts_ls",
|
||||
"rust_analyzer",
|
||||
"gopls",
|
||||
"clangd",
|
||||
"bashls",
|
||||
"jsonls",
|
||||
"html",
|
||||
"cssls",
|
||||
'lua_ls',
|
||||
'pyright',
|
||||
'ts_ls',
|
||||
'rust_analyzer',
|
||||
'gopls',
|
||||
'clangd',
|
||||
'bashls',
|
||||
'jsonls',
|
||||
'html',
|
||||
'cssls',
|
||||
}) do
|
||||
local ok, config = pcall(require, "lsp." .. server)
|
||||
local ok, config = pcall(require, 'lsp.' .. server)
|
||||
if ok then
|
||||
vim.lsp.config(server, config)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue