how to require language servers
This commit is contained in:
parent
288735707b
commit
c438c87ed6
|
@ -25,7 +25,7 @@
|
||||||
"williamboman/mason-lspconfig.nvim"
|
"williamboman/mason-lspconfig.nvim"
|
||||||
{:url "https://github.com/j-hui/fidget.nvim"
|
{:url "https://github.com/j-hui/fidget.nvim"
|
||||||
:tag "legacy"
|
:tag "legacy"
|
||||||
:opts {}} ; NOTE: `opts = {}` is the same as calling `require("fidget").setup({})`
|
:opts {}}
|
||||||
"folke/neodev.nvim"]}
|
"folke/neodev.nvim"]}
|
||||||
]))
|
]))
|
||||||
|
|
||||||
|
@ -37,13 +37,10 @@
|
||||||
mason (require :mason)
|
mason (require :mason)
|
||||||
mason-lspconfig (require :mason-lspconfig)
|
mason-lspconfig (require :mason-lspconfig)
|
||||||
servers
|
servers
|
||||||
{:lua_ls {
|
{:lua_ls {:Lua {:workspace {:checkThirdParty false}
|
||||||
:Lua {
|
:telemetry {:enable false}}}
|
||||||
:workspace { :checkThirdParty false }
|
:fennel_language_server {}
|
||||||
:telemetry { :enable false }}}
|
:bashls {}
|
||||||
;:fennel_language_server {}
|
|
||||||
;:bash_language_server {}
|
|
||||||
;:jq {}
|
|
||||||
}
|
}
|
||||||
on_attach (fn [_ bufnr]
|
on_attach (fn [_ bufnr]
|
||||||
(let
|
(let
|
||||||
|
@ -60,12 +57,12 @@
|
||||||
(mason.setup)
|
(mason.setup)
|
||||||
(mason-lspconfig.setup {:ensure_installed (vim.tbl_keys servers)})
|
(mason-lspconfig.setup {:ensure_installed (vim.tbl_keys servers)})
|
||||||
(mason-lspconfig.setup_handlers
|
(mason-lspconfig.setup_handlers
|
||||||
[(fn [server_name] (let
|
;; TODO require is looking in the wrong spot?
|
||||||
[server (require server_name)
|
[(fn [server_name] (let [server (require server_name)]
|
||||||
]
|
(print server_name)
|
||||||
(server.setup
|
(server.setup
|
||||||
{:capabilities (vim.lsp.protocol.make_client_capabilities)
|
{:capabilities (vim.lsp.protocol.make_client_capabilities)
|
||||||
:on_attach on_attach
|
:on_attach on_attach
|
||||||
:settings (. servers server_name)
|
:settings (. servers server_name)
|
||||||
:filetypes (or settings.filetypes []) })))
|
:filetypes (or settings.filetypes []) })))
|
||||||
]))
|
]))
|
||||||
|
|
4
init.lua
4
init.lua
|
@ -1,13 +1,11 @@
|
||||||
local hotpot_path = vim.fn.stdpath('data') .. '/lazy/hotpot.nvim'
|
local hotpot_path = vim.fn.stdpath('data') .. '/lazy/hotpot.nvim'
|
||||||
|
|
||||||
vim.opt.rtp:prepend(hotpot_path)
|
|
||||||
|
|
||||||
if vim.fn.empty(vim.fn.glob(hotpot_path)) > 0 then
|
if vim.fn.empty(vim.fn.glob(hotpot_path)) > 0 then
|
||||||
print("Could not find hotpot.nvim, cloning new copy to", hotpot_path)
|
print("Could not find hotpot.nvim, cloning new copy to", hotpot_path)
|
||||||
vim.fn.system({'git', 'clone',
|
vim.fn.system({'git', 'clone',
|
||||||
'https://github.com/rktjmp/hotpot.nvim', hotpot_path})
|
'https://github.com/rktjmp/hotpot.nvim', hotpot_path})
|
||||||
vim.cmd("helptags " .. hotpot_path .. "/doc")
|
vim.cmd("helptags " .. hotpot_path .. "/doc")
|
||||||
end
|
end
|
||||||
|
vim.opt.rtp:prepend(hotpot_path)
|
||||||
|
|
||||||
require("hotpot")
|
require("hotpot")
|
||||||
require("init")
|
require("init")
|
||||||
|
|
Loading…
Reference in a new issue