mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-11-05 23:29:27 +01:00
improve nvim config for commonlisp
This commit is contained in:
parent
03649e9b7c
commit
6550a3b587
5 changed files with 14 additions and 17 deletions
|
@ -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}})
|
||||
|
|
|
@ -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})))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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}})
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue