From eaca56b4475cc1d3809b8ba63e9baa0395db2362 Mon Sep 17 00:00:00 2001 From: Zofia Szweda Date: Thu, 10 Sep 2026 21:56:16 +0200 Subject: vim: remove vim-lsp-settings and add lsp support for zettelkasten (zk) --- fish/.config/fish/config.fish | 4 +++- fish/.config/fish/fish_variables | 2 +- vim/.vimrc | 23 +++++++++++++---------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish index 8121ec4..e378fbd 100644 --- a/fish/.config/fish/config.fish +++ b/fish/.config/fish/config.fish @@ -12,6 +12,8 @@ alias hx vim # for learning purposes alias apt nala alias vial Vial alias sudo doas +# set +set -gx EDITOR vim # Functions function webpush @@ -89,4 +91,4 @@ function clip end end -set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /home/sophie/.ghcup/bin $PATH # ghcup-env \ No newline at end of file +set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin /home/sophie/.ghcup/bin $PATH # ghcup-env diff --git a/fish/.config/fish/fish_variables b/fish/.config/fish/fish_variables index be4c549..f9ae1da 100644 --- a/fish/.config/fish/fish_variables +++ b/fish/.config/fish/fish_variables @@ -29,4 +29,4 @@ SETUVAR fish_pager_color_description:yellow\x1e\x2di SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_selected_background:\x2dr -SETUVAR --export fish_user_paths:/home/sophie/\x2elocal/bin\x1e/usr/sbin\x1e/sbin\x1e/home/sophie/go/bin/ +SETUVAR --export fish_user_paths:/home/sophie/\x2elocal/bin\x1e/usr/sbin\x1e/sbin\x1e/home/sophie/go/bin/\x1e/home/sophie/\x2eyarn/bin diff --git a/vim/.vimrc b/vim/.vimrc index d5182d9..d9edeec 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -14,8 +14,6 @@ Plug 'ap/vim-buftabline' Plug 'sheerun/vim-polyglot' Plug 'tpope/vim-commentary' Plug 'yegappan/lsp' -Plug 'mattn/vim-lsp-settings' -Plug 'normen/vim-lsp-settings-adapter' Plug 'dense-analysis/ale' Plug 'kalbasit/vim-colemak' call plug#end() @@ -71,14 +69,16 @@ let g:ale_linters = { \'vim': ['vint'], \'css': ['stylelint'], \'html': ['tidy', 'htmlhint'], - \'js': ['eslint'] + \'js': ['eslint'], + \'go': ['golangci-lint'], + \'markdown': [], \} let g:ale_fixers = { \'html': ['tidy'], \} let g:ale_html_tidy_options = '-indent -asxhtml -q ' let g:ale_sign_column_always = 1 -let g:ale_lint_on_text_changed = 'normal' +let g:lsp_settings_filetype_markdown = [] let g:ale_lint_on_save = 1 let g:ale_fix_on_save = 1 let g:buftabline_show = 2 @@ -99,13 +99,12 @@ let g:which_key_map.b = { \ 'b' : ['Buffers', 'fuzzy find buffers'], \ } call which_key#register('', 'g:which_key_map') -" lsp + augroup lsp - autocmd! autocmd User LspSetup call LspOptionsSet(#{ \ autoComplete: v:true, \ autoHighlightDiags: v:true, - \ noNewlineInCompletion: v:true, + \ noNewlineCompletion: v:true, \ formatFallback: v:false, \ }) @@ -115,8 +114,12 @@ autocmd User LspSetup call LspAddServer([ \ #{name: 'clangd', filetype: ['c', 'cpp', 'objc', 'objcpp'], path: 'clangd', args: ['--background-index']}, \ #{name: 'html', filetype: 'html', path: 'vscode-html-language-server', args: ['--stdio']}, \ #{name: 'css', filetype: ['css', 'scss', 'less'], path: 'vscode-css-language-server', args: ['--stdio']}, + \ #{name: 'js', filetype: ['ts', 'js', 'jsx'], path: 'typescript-language-server', args: []}, + \ #{name: 'vim', filetype: 'vim', path: 'vim-language-server', args: ['--stdio']}, + \ #{name: 'go', filetype: 'go', path: 'gopls', args: ['--stdio']}, + \ #{name: 'zk', filetype: 'markdown', path: 'zk', args: ['lsp']}, \]) - + autocmd User LspAttached call s:lsp_keymaps() function! s:lsp_keymaps() abort @@ -128,9 +131,9 @@ function! s:lsp_keymaps() abort nmap [g :LspDiagPrev nmap ]g :LspDiagNext nmap K :LspHover - if index(['vim', 'html', 'css'], &filetype) == -1 + if index(['vim', 'html', 'css', 'markdown'], &filetype) == -1 autocmd BufWritePre LspFormat - endif + endif endfunction augroup END -- cgit v1.2.3