vim lsp, use relativepath for file in lightline

pull/2/head
Alpha Chen 2 years ago
parent bd28882d29
commit e7df919740
No known key found for this signature in database

@ -102,11 +102,10 @@
;; https://github.com/itchyny/lightline.vim/issues/168#issuecomment-232183744
(let [colorscheme :powerline
component {:filename "%{expand(\"%:~:.\")}"} ; relative path
palette-key (.. "lightline#colorscheme#" colorscheme "#palette")
palette (. vim.g palette-key)]
(set vim.g.lightline
{: colorscheme
:active {:left [[:mode :paste] [:readonly :relativepath :modified]]}})
(set vim.g.lightline {: colorscheme : component})
(each [_ f (ipairs [:normal :inactive :tabline])]
(tset palette f :middle [[:NONE :NONE :NONE :NONE]]))
(tset vim.g palette-key palette))

@ -65,12 +65,6 @@
; flake8 (lint "flake8 --stdin-display-name ${INPUT} -" ["%f:%l:%c: %m"])
isort (fmt "isort --quiet --profile black -")
python [black isort]]
(setup-lsp :pylsp {:on_attach (on-attach-do attach-navic disable-fmt)})
(setup-lsp :pyright
{:on_attach on-attach
:settings {:python {:analysis {:autoImportCompletions true}}}})
(setup-lsp :typeprof)
(setup-lsp :vuels {:on_attach (on-attach-do attach-navic disable-fmt)})
(setup-lsp :efm {:on_attach on-attach
:init_options {:documentFormatting true
:hover true
@ -89,8 +83,15 @@
:python
:typescriptreact
:vue]})
(setup-lsp :tsserver {:on_attach (on-attach-do attach-navic disable-fmt)})
(setup-lsp :elmls)
(setup-lsp :pylsp {:on_attach (on-attach-do attach-navic disable-fmt)})
(setup-lsp :pyright
{:on_attach on-attach
:settings {:python {:analysis {:autoImportCompletions true}}}})
(setup-lsp :rust_analyzer
{:on_attach on-attach
: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 :typeprof)
(setup-lsp :vuels {:on_attach (on-attach-do attach-navic disable-fmt)}))

Loading…
Cancel
Save