summaryrefslogtreecommitdiff
path: root/dot_config/nvim/lua/plugins/lsp/init.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dot_config/nvim/lua/plugins/lsp/init.lua87
1 files changed, 34 insertions, 53 deletions
diff --git a/dot_config/nvim/lua/plugins/lsp/init.lua b/dot_config/nvim/lua/plugins/lsp/init.lua
index 4c81c54..ce704ec 100644
--- a/dot_config/nvim/lua/plugins/lsp/init.lua
+++ b/dot_config/nvim/lua/plugins/lsp/init.lua
@@ -1,54 +1,35 @@
--- lsp options + runtime bindings
--- technically I could do some tree transforms, but that's a pain and I haven't done fennel stuff yet
--- + I'm not sure how feasible fennel stuff is in bootstrap-phase
--- anyway this is here to be in front of everything, so you can edit the settings you actually care about
-local gopts = function(plist)
- return {
- clangd = {},
- clojure_lsp = {
- root_dir = plist('project.clj', 'deps.edn', 'bb.edn', 'build.boot', 'shadow-cljs.edn', '.git'),
- },
- denols = {
- autostart = false,
- root_dir = plist('deno.json', 'deno.jsonc'),
- },
- gopls = {},
- ltex = {},
- lua_ls = {},
- texlab = {filetypes = {'tex', 'plaintex', 'bib', 'latex'}},
- tsserver = {
- autostart = false,
- root_dir = plist('tsconfig.json', 'package.json'),
- },
- zls = {},
- }
+-- [nfnl] Compiled from fnl/plugins/lsp/init.fnl by https://github.com/Olical/nfnl, do not edit.
+local function gopts(plist)
+ return {clangd = {}, clojure_lsp = {root_dir = plist("project.clj", "deps.edn", "bb.edn", "build.boot", "shadow-cljs.edn", ".git")}, denols = {root_dir = plist("deno.json", "deno.jsonc"), autostart = false}, gopls = {}, ltex = {}, lua_ls = {}, texlab = {filetypes = {"tex", "plaintex", "bib", "latex"}}, tsserver = {root_dir = plist("tsconfig.json", "package.json"), autostart = false}, zls = {}}
end
-
-local attach = require 'plugins.lsp.attach'
-local caps = require 'plugins.lsp.capabilities'
-
-return {
- {
- 'neovim/nvim-lspconfig',
- config = function(_, opts)
- for k, v in pairs(opts) do
- v.on_attach = v.on_attach or attach
- if type(caps) == 'table' then
- v.capabilities = v.capabilities or caps
- end
- local s = require 'lspconfig'[k]
- local c = v.cmd or s.document_config.default_config.cmd
- if vim.fn.executable(c[1]) ~= 0 then
- s.setup(v)
- end
- end
- end,
- opts = function()
- local plist = function(...)
- local p = require 'lspconfig.util'.root_pattern(...)
- return function(f) return p(f) end
- end
- return gopts(plist)
- end
- },
-}
+local attach = require("plugins.lsp.attach")
+local caps = require("plugins.lsp.capabilities")
+local function _1_(_, opts)
+ for k, v in pairs(opts) do
+ v.on_attach = (attach or v.on_attach)
+ if ("table" == type(caps)) then
+ v.capabilities = (v.capabilities or caps)
+ else
+ end
+ local s = (require("lspconfig"))[k]
+ local c = (v.cmd or s.document_config.default_config.cmd)
+ if (0 ~= vim.fn.executable(c[1])) then
+ s.setup(v)
+ else
+ end
+ end
+ return nil
+end
+local function _4_()
+ local plist
+ local function _5_(...)
+ local p = (require("lspconfig.util")).root_pattern(...)
+ local function _6_(_241)
+ return p(_241)
+ end
+ return _6_
+ end
+ plist = _5_
+ return gopts(plist)
+end
+return {{"neovim/nvim-lspconfig", config = _1_, opts = _4_}}