summaryrefslogtreecommitdiff
path: root/dot_config/nvim/pre.fnl
diff options
context:
space:
mode:
authorChloƩ Vulquin <code@toast.bunkerlabs.net>2025-04-02 13:55:07 +0200
committerChloƩ Vulquin <code@toast.bunkerlabs.net>2025-04-02 13:55:07 +0200
commitd2f4d5dec7eededffc956fe6745139d98d695509 (patch)
treeacd79555cdd16ae02794ce8b36bd0f153ee9d6b9 /dot_config/nvim/pre.fnl
parentnvim/conjure: move fennel support to nfnl (diff)
nvim: upgrade configs for v0.11
Bunch of stuff bundled with it. `lsp/` subject to changes.
Diffstat (limited to 'dot_config/nvim/pre.fnl')
-rw-r--r--dot_config/nvim/pre.fnl26
1 files changed, 25 insertions, 1 deletions
diff --git a/dot_config/nvim/pre.fnl b/dot_config/nvim/pre.fnl
index a22a233..264da6c 100644
--- a/dot_config/nvim/pre.fnl
+++ b/dot_config/nvim/pre.fnl
@@ -22,11 +22,15 @@
:foldmethod :expr
:foldexpr "nvim_treesitter#foldexpr()"
:foldlevelstart 99
- :wrap true})
+ :wrap true
+ :winborder :rounded})
(each [k v (pairs options)]
(tset vim.opt k v))
+; diagnostics
+(vim.diagnostic.config {:virtual_lines true})
+
; OSC 52 on nvim >= 0.10.0
(let [{: major : minor} (vim.version)]
(when (or (> major 0) (>= minor 10))
@@ -45,3 +49,23 @@
(set bo.filetype val)
; otherwise the change in ft will override editorconfig settings
(ec.config bufnr))))))
+
+; lsp
+(vim.api.nvim_create_autocmd
+ :LspAttach
+ {:callback
+ (fn [ev]
+ (let [client (vim.lsp.get_client_by_id ev.data.client_id)]
+ (when (client:supports_method :textDocument/completion)
+ (vim.lsp.completion.enable true client.id ev.buf
+ {:autotrigger true}))))})
+
+(vim.lsp.enable [:clangd
+ :clojure_lsp
+ :gopls
+ :lua_ls
+ :ruff
+ :pyright
+ :texlab
+ :ts_ls
+ :zls])