Compare commits
2 Commits
021ed18ad9
...
18207d1170
| Author | SHA1 | Date | |
|---|---|---|---|
| 18207d1170 | |||
| 6fda652577 |
@ -82,7 +82,6 @@ apt = [
|
|||||||
|
|
||||||
apt_13 = [
|
apt_13 = [
|
||||||
'eza',
|
'eza',
|
||||||
'neovim',
|
|
||||||
'tree-sitter-cli',
|
'tree-sitter-cli',
|
||||||
'python3-ollama',
|
'python3-ollama',
|
||||||
'lazygit',
|
'lazygit',
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
local servers = require("lsp.config.lsp_servers").lsp_servers
|
local servers = require("lsp.config.lsp_servers").lsp_servers
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
@ -20,5 +19,12 @@ for _, name in ipairs(servers) do
|
|||||||
if not ok then config = {} end
|
if not ok then config = {} end
|
||||||
config.capabilities = capabilities
|
config.capabilities = capabilities
|
||||||
config.on_attach = on_attach
|
config.on_attach = on_attach
|
||||||
lspconfig[name].setup(config)
|
|
||||||
|
if vim.lsp.config then
|
||||||
|
-- Neovim 0.11+
|
||||||
|
vim.lsp.config(name, config)
|
||||||
|
else
|
||||||
|
-- Neovim 0.10.x 與舊版 nvim-lspconfig
|
||||||
|
require("lspconfig")[name].setup(config)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user