summaryrefslogtreecommitdiff
path: root/fnl/plugins/lsp
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/lsp')
-rw-r--r--fnl/plugins/lsp/diagnostics.fnl4
-rw-r--r--fnl/plugins/lsp/keymaps.fnl2
-rw-r--r--fnl/plugins/lsp/lspconfig.fnl10
-rw-r--r--fnl/plugins/lsp/mason-lspconfig.fnl6
-rw-r--r--fnl/plugins/lsp/servers.fnl2
5 files changed, 12 insertions, 12 deletions
diff --git a/fnl/plugins/lsp/diagnostics.fnl b/fnl/plugins/lsp/diagnostics.fnl
index 9fbb627..5956e0e 100644
--- a/fnl/plugins/lsp/diagnostics.fnl
+++ b/fnl/plugins/lsp/diagnostics.fnl
@@ -7,7 +7,7 @@
{:name :DiagnosticSignHint :text (. icons :hint)}
{:name :DiagnosticSignInfo :text (. icons :info)}])
-(fn configure-signs []
+(λ configure-signs []
(each [_ sign (ipairs signs)]
(vim.fn.sign_define sign.name {:texthl sign.name :text sign.text :numhl ""})))
@@ -23,7 +23,7 @@
:header ""
:prefix ""}})
-(fn setup []
+(λ setup []
(configure-signs)
(vim.diagnostic.config config)
(set vim.lsp.handlers.textDocument/hover false)
diff --git a/fnl/plugins/lsp/keymaps.fnl b/fnl/plugins/lsp/keymaps.fnl
index 2c01d15..72e03cd 100644
--- a/fnl/plugins/lsp/keymaps.fnl
+++ b/fnl/plugins/lsp/keymaps.fnl
@@ -40,7 +40,7 @@
[:n :K "<cmd>lua vim.lsp.hover()<cr>" {:desc "Hover documentation"}]
[:n :<leader>li :<cmd>LspInfo<cr> {:desc "Lsp Info"}]])
-(fn on-attach [buffer]
+(λ on-attach [buffer]
(let [opts {:noremap true :silent true : buffer}]
(each [_ mapping (ipairs mappings)]
(match mapping
diff --git a/fnl/plugins/lsp/lspconfig.fnl b/fnl/plugins/lsp/lspconfig.fnl
index a778eb3..112973b 100644
--- a/fnl/plugins/lsp/lspconfig.fnl
+++ b/fnl/plugins/lsp/lspconfig.fnl
@@ -1,13 +1,13 @@
;; Configuration for lsp clients.
-(fn on-attach []
+(λ on-attach []
(vim.api.nvim_create_autocmd :LspAttach
- {:callback (fn [args]
- (let [keymaps (require :plugins.lsp.keymaps)
+ {:callback (λ [args]
+ (let [{: on-attach} (require :plugins.lsp.keymaps)
buffer (. args :buf)]
- (keymaps.on-attach buffer)))}))
+ (on-attach buffer)))}))
-(fn config []
+(λ config []
(on-attach)
(let [diagnostics (require :plugins.lsp.diagnostics)
mason-lspconfig (require :plugins.lsp.mason-lspconfig)
diff --git a/fnl/plugins/lsp/mason-lspconfig.fnl b/fnl/plugins/lsp/mason-lspconfig.fnl
index 21a07ad..105693e 100644
--- a/fnl/plugins/lsp/mason-lspconfig.fnl
+++ b/fnl/plugins/lsp/mason-lspconfig.fnl
@@ -1,11 +1,11 @@
;; A bridge plugin between mason and lspconfig, handles installation of lsp and
;; setup hooks for client configurations.
-(fn capabilities []
+(λ capabilities []
(let [cmp-lsp (require :cmp_nvim_lsp)]
(cmp-lsp.default_capabilities (vim.lsp.protocol.make_client_capabilities))))
-(fn handlers [server]
+(λ handlers [server]
(let [servers (require :plugins.lsp.servers)
lspconfig (require :lspconfig)]
(let [config (. lspconfig server)
@@ -13,7 +13,7 @@
(tset opts :capabilities (capabilities))
(config.setup opts))))
-(fn setup []
+(λ setup []
(let [mason-lspconfig (require :mason-lspconfig)
servers (require :plugins.lsp.servers)]
(mason-lspconfig.setup {:ensure_installed (vim.tbl_keys servers)
diff --git a/fnl/plugins/lsp/servers.fnl b/fnl/plugins/lsp/servers.fnl
index ab8cad6..0dbb16f 100644
--- a/fnl/plugins/lsp/servers.fnl
+++ b/fnl/plugins/lsp/servers.fnl
@@ -10,7 +10,7 @@
:settings {:json {:schemas (let [schemastore (require :schemastore)]
(schemastore.json.schemas))
:validate {:enable true}}}
- :setup {:commands {:Format [(fn []
+ :setup {:commands {:Format [(λ []
(vim.lsp.buf.range_formatting [] [0 0]
[(vim.fn.line "$"
0)]))]}}}