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