|
|
@ -30,8 +30,7 @@
|
|
|
|
:filetypes [:fennel]
|
|
|
|
:filetypes [:fennel]
|
|
|
|
:root_dir #(lspconfig.util.find_git_ancestor $1)
|
|
|
|
:root_dir #(lspconfig.util.find_git_ancestor $1)
|
|
|
|
:settings {}}})
|
|
|
|
:settings {}}})
|
|
|
|
(tset configs :steep
|
|
|
|
(tset configs :steep {:default_config {:cmd ["steep langserver"]
|
|
|
|
{:default_config {:cmd ["steep langserver"]
|
|
|
|
|
|
|
|
:filetypes [:ruby]
|
|
|
|
:filetypes [:ruby]
|
|
|
|
:root_dir #(lspconfig.util.find_git_ancestor $1)
|
|
|
|
:root_dir #(lspconfig.util.find_git_ancestor $1)
|
|
|
|
:settings {}}}))
|
|
|
|
:settings {}}}))
|
|
|
@ -87,21 +86,26 @@
|
|
|
|
(let [{: setup} (. lspconfig lsp)]
|
|
|
|
(let [{: setup} (. lspconfig lsp)]
|
|
|
|
(setup (or config {:on_attach on-attach}))))
|
|
|
|
(setup (or config {:on_attach on-attach}))))
|
|
|
|
|
|
|
|
|
|
|
|
(let [fmt #{:formatCommand $1 :formatStdin true}
|
|
|
|
(local fmt #{:formatCommand $1 :formatStdin true})
|
|
|
|
lint #{:lintCommand $1 :lintFormats $2 :lintStdin true}
|
|
|
|
(local lint #{:lintCommand $1 :lintFormats $2 :lintStdin true})
|
|
|
|
fennel-lint "fennel --globals vim,hs,spoon --raw-errors $(realpath --relative-to . ${INPUT}) 2>&1"
|
|
|
|
(local fennel-lint
|
|
|
|
fennel [(fmt "fnlfmt /dev/stdin") (lint fennel-lint ["%f:%l: %m"])]
|
|
|
|
"fennel --globals vim,hs,spoon --raw-errors $(realpath --relative-to . ${INPUT}) 2>&1")
|
|
|
|
eslint {:lintCommand "eslint -f visualstudio --stdin --stdin-filename ${INPUT}"
|
|
|
|
|
|
|
|
|
|
|
|
(local fennel [(fmt "fnlfmt /dev/stdin") (lint fennel-lint ["%f:%l: %m"])])
|
|
|
|
|
|
|
|
(local eslint
|
|
|
|
|
|
|
|
{:lintCommand "eslint -f visualstudio --stdin --stdin-filename ${INPUT}"
|
|
|
|
:lintIgnoreExitCode true
|
|
|
|
:lintIgnoreExitCode true
|
|
|
|
:lintStdin true
|
|
|
|
:lintStdin true
|
|
|
|
:lintFormats ["%f(%l,%c): %tarning %m" "%f(%l,%c): %rror %m"]}
|
|
|
|
:lintFormats ["%f(%l,%c): %tarning %m" "%f(%l,%c): %rror %m"]})
|
|
|
|
prettier (fmt "prettier --stdin-filepath ${INPUT}")
|
|
|
|
|
|
|
|
javascript [eslint prettier]
|
|
|
|
(local prettier (fmt "prettier --stdin-filepath ${INPUT}"))
|
|
|
|
black (fmt "black --quiet -")
|
|
|
|
(local javascript [eslint prettier])
|
|
|
|
; flake8 (lint "flake8 --stdin-display-name ${INPUT} -" ["%f:%l:%c: %m"])
|
|
|
|
(local black (fmt "black --quiet -"))
|
|
|
|
isort (fmt "isort --quiet --profile black -")
|
|
|
|
(local flake8 (lint "flake8 --stdin-display-name ${INPUT} -" ["%f:%l:%c: %m"]))
|
|
|
|
python [black isort]]
|
|
|
|
(local isort (fmt "isort --quiet --profile black -"))
|
|
|
|
(setup-lsp :efm {:on_attach on-attach
|
|
|
|
(local python [black isort])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(setup-lsp :efm {:on_attach on-attach
|
|
|
|
:init_options {:documentFormatting true
|
|
|
|
:init_options {:documentFormatting true
|
|
|
|
:hover true
|
|
|
|
:hover true
|
|
|
|
:documentSymbol true
|
|
|
|
:documentSymbol true
|
|
|
@ -119,20 +123,44 @@
|
|
|
|
:python
|
|
|
|
:python
|
|
|
|
:typescriptreact
|
|
|
|
:typescriptreact
|
|
|
|
:vue]})
|
|
|
|
:vue]})
|
|
|
|
(setup-lsp :elmls)
|
|
|
|
|
|
|
|
(setup-lsp :fennel-ls)
|
|
|
|
(setup-lsp :elmls)
|
|
|
|
(setup-lsp :pylsp {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
(setup-lsp :fennel-ls)
|
|
|
|
(setup-lsp :pyright
|
|
|
|
(setup-lsp :pylsp {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
|
|
|
|
(setup-lsp :pyright
|
|
|
|
{:on_attach on-attach
|
|
|
|
{:on_attach on-attach
|
|
|
|
:settings {:python {:analysis {:autoImportCompletions true}}}})
|
|
|
|
:settings {:python {:analysis {:autoImportCompletions true}}}})
|
|
|
|
(setup-lsp :rust_analyzer
|
|
|
|
|
|
|
|
|
|
|
|
(setup-lsp :rust_analyzer
|
|
|
|
{:on_attach on-attach
|
|
|
|
{:on_attach on-attach
|
|
|
|
:cmd [:rustup :run :stable :rust-analyzer]
|
|
|
|
:cmd [:rustup :run :stable :rust-analyzer]
|
|
|
|
:settings {:rust-analyzer {:checkOnSave {:command :clippy}}}})
|
|
|
|
:settings {:rust-analyzer {:checkOnSave {:command :clippy}}}})
|
|
|
|
(setup-lsp :tsserver {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
|
|
|
|
; (setup-lsp :ruby_ls)
|
|
|
|
(setup-lsp :tsserver {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
; (setup-lsp :typeprof)
|
|
|
|
(setup-lsp :vuels {:on_attach (on-attach-do attach-navic disable-fmt)})
|
|
|
|
; (setup-lsp :steep)
|
|
|
|
|
|
|
|
(setup-lsp :vuels {:on_attach (on-attach-do attach-navic disable-fmt)}))
|
|
|
|
;; TODO
|
|
|
|
|
|
|
|
;; https://github.com/Shopify/ruby-lsp/issues/188#issuecomment-1268932965
|
|
|
|
|
|
|
|
; (local request-diagnostics
|
|
|
|
|
|
|
|
; (fn [client buffer]
|
|
|
|
|
|
|
|
; (let [{: util : diagnostic} lsp
|
|
|
|
|
|
|
|
; params (util.make_text_document_params buffer)
|
|
|
|
|
|
|
|
; publish-diagnostics #(diagnostic.on_publish_diagnostics nil
|
|
|
|
|
|
|
|
; (vim.tbl_extend :keep
|
|
|
|
|
|
|
|
; params
|
|
|
|
|
|
|
|
; {:diagnostics $1.items})
|
|
|
|
|
|
|
|
; {:client_id client.id})
|
|
|
|
|
|
|
|
; update-diagnostics #(when (not $1)
|
|
|
|
|
|
|
|
; (publish-diagnostics $2))
|
|
|
|
|
|
|
|
; callback #(client.request :textDocument/diagnostic
|
|
|
|
|
|
|
|
; {:textDocument params}
|
|
|
|
|
|
|
|
; update-diagnostics)]
|
|
|
|
|
|
|
|
; (vim.api.nvim_create_autocmd [:BufEnter :BufWritePre :CursorHold]
|
|
|
|
|
|
|
|
; {: buffer : callback}))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; (fn setup-ruby-ls []
|
|
|
|
|
|
|
|
; (let []
|
|
|
|
|
|
|
|
; (setup-lsp :ruby_ls {:on_attach (on-attach-do request-diagnostics)})))
|
|
|
|
|
|
|
|
|
|
|
|
{: setup-lsp}
|
|
|
|
{: setup-lsp}
|
|
|
|
|
|
|
|
|
|
|
|