improve nvim config for commonlisp

This commit is contained in:
LordMZTE 2023-05-13 12:42:35 +02:00
parent 03649e9b7c
commit 6550a3b587
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
5 changed files with 14 additions and 17 deletions

View file

@ -9,4 +9,6 @@
;; nvim doesn't know zon
:zon :zig
;; Default to Common Lisp instead of just using generic Lisp
:lisp :commonlisp}})
:lisp :commonlisp
;; Roswell scripts
:ros :commonlisp}})

View file

@ -6,10 +6,7 @@
;; Symbol highlighting
(vim.api.nvim_create_autocmd :CursorHold
{:buffer buf
:callback vim.lsp.buf.document_highlight})
(vim.api.nvim_create_autocmd :CursorHoldI
{:buffer buf
:callback vim.lsp.buf.document_highlight})
:callback #(pcall vim.lsp.buf.document_highlight)})
(vim.api.nvim_create_autocmd :CursorMoved
{:buffer buf
:callback vim.lsp.buf.clear_references})))

View file

@ -8,13 +8,16 @@
;; Only enable used clients
(tset vim :g "conjure#filetypes" [:clojure
:commonlisp
:fennel
:racket
:scheme
:lua
:lisp
:python])
(tset vim :g "conjure#filetype#rust" false)
(tset vim :g "conjure#filetype#lisp" false)
(tset vim :g "conjure#filetype#commonlisp" "conjure.client.common-lisp.swank")
;; This has custom handling for compat with LSP
(tset vim :g "conjure#mapping#doc_word" false)

View file

@ -1,6 +1,10 @@
(local wdi (require :nvim-web-devicons))
(local racket-icon {:icon "λ" :color "#9f1d20" :cterm_color 88 :name :Racket})
(local commonlisp-icon {:icon "λ"
:color "#3fb68b"
:cterm_color 49
:name :CommonLisp})
(wdi.setup {:override {:rkt racket-icon
:rktl racket-icon
@ -9,7 +13,5 @@
:color "#3e5ba9"
:cterm_color 61
:name :Scheme}
:lisp {:icon "λ"
:color "#3fb68b"
:cterm_color 49
:name :CommonLisp}}})
:lisp commonlisp-icon
:ros commonlisp-icon}})

View file

@ -22,13 +22,6 @@
(tset caps :textDocument :foldingRange
{:dynamicRegistration false :lineFoldingOnly true})
;; Check if the buffer is a conjure log and stop the client if it is.
;; TODO: This doesn't work on popups, seems like on_attach isn't called.
(fn check-conjure [client buf]
(when (vim.startswith (vim.fs.basename (vim.api.nvim_buf_get_name buf))
:conjure-)
(client.stop)))
(fn disable-formatter [client _]
(tset client :server_capabilities :documentFormattingRangeProvider false))