mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-06-01 14:43:14 +02:00
disable lsps for conjure logs
This commit is contained in:
parent
3f5186aec2
commit
d6517d25de
|
@ -4,6 +4,8 @@
|
|||
(var args args)
|
||||
(when (not args)
|
||||
(set args {}))
|
||||
(when (not (. args :on_attach))
|
||||
(tset args :on_attach `check-conjure))
|
||||
(tset args :capabilities `caps)
|
||||
`((. lspc ,conf :setup) ,args))
|
||||
|
||||
|
@ -13,10 +15,18 @@
|
|||
(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))
|
||||
|
||||
(setup :clangd {:on_attach disable-formatter})
|
||||
(setup :clangd {:on_attach (fn [c b] (disable-formatter c b)
|
||||
(check-conjure c b))})
|
||||
(setup :cssls)
|
||||
(setup :elixirls {:cmd [:elixir-ls]})
|
||||
(setup :eslint)
|
||||
|
|
|
@ -67,9 +67,7 @@
|
|||
(use/pconf use :CKolkey/ts-node-action :tsn-actions
|
||||
{:requires :jose-elias-alvarez/null-ls.nvim})
|
||||
(use :nvim-treesitter/playground)
|
||||
(use {1 :Olical/conjure
|
||||
;; TODO: stop LSPs from attaching to conjure log
|
||||
:config #(set vim.g.conjure#mapping#prefix :<F1>)})
|
||||
(use {1 :Olical/conjure :config #(set vim.g.conjure#mapping#prefix :<F1>)})
|
||||
(cmp-plugins use))
|
||||
|
||||
((. (require :packer) :startup) init)
|
||||
|
|
Loading…
Reference in a new issue