Compare commits
No commits in common. "18207d11706cbe8abf09992e110f9c5f66c3afb8" and "021ed18ad905235765a421cf937da940d3f01e55" have entirely different histories.
18207d1170
...
021ed18ad9
@ -82,6 +82,7 @@ apt = [
|
|||||||
|
|
||||||
apt_13 = [
|
apt_13 = [
|
||||||
'eza',
|
'eza',
|
||||||
|
'neovim',
|
||||||
'tree-sitter-cli',
|
'tree-sitter-cli',
|
||||||
'python3-ollama',
|
'python3-ollama',
|
||||||
'lazygit',
|
'lazygit',
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
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)
|
||||||
@ -19,12 +20,5 @@ 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