From d2f4d5dec7eededffc956fe6745139d98d695509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Vulquin?= Date: Wed, 2 Apr 2025 13:55:07 +0200 Subject: nvim: upgrade configs for v0.11 Bunch of stuff bundled with it. `lsp/` subject to changes. --- dot_config/nvim/pre.fnl | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'dot_config/nvim/pre.fnl') 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]) -- cgit v1.2.3