From 782a2237d475234f5b9a60f70c72e9917971ef88 Mon Sep 17 00:00:00 2001 From: Zofia Szweda Date: Mon, 7 Sep 2026 20:15:48 +0200 Subject: XMonad: add an XMonad and XMobar config Added a config for the Xmonad (https://xmonad.org) window manager, along with its bar --- vim/.vimrc | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'vim/.vimrc') diff --git a/vim/.vimrc b/vim/.vimrc index a92c9db..45268aa 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,6 +1,6 @@ if empty(glob('~/.vim/autoload/plug.vim')) - silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim endif call plug#begin('~/.vim/plugged') Plug 'itchyny/lightline.vim' @@ -83,22 +83,23 @@ let g:which_key_map.b = { call which_key#register('', 'g:which_key_map') " lsp autocmd User LspSetup call LspOptionsSet(#{ - \ autoComplete: v:true, - \ autoHighlightDiags: v:true, - \ formatFallbck: v:true, - \ }) + \ autoComplete: v:true, + \ autoHighlightDiags: v:true, + \ formatFallbck: v:false, + \ }) autocmd User LspSetup call LspAddServer([ - \ #{name: 'pylsp', filetype: 'python', path: 'pylsp'}, - \ #{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: 'ts', filetype: ['javascript', 'javascript.jsx', 'javascriptreact'], - \ path: 'typescript-language-server', args: ['--stdio']}, - \ ]) + \ #{name: 'hs', filetype: ['hs', 'lhs'], path: 'haskell-language-server-wrapper'}, + \ #{name: 'pylsp', filetype: 'python', path: 'pylsp'}, + \ #{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: 'ts', filetype: ['javascript', 'javascript.jsx', 'javascriptreact'], + \ path: 'typescript-language-server', args: ['--stdio']}, + \ ]) autocmd User LspAttached call s:lsp_keymaps() function! s:lsp_keymaps() abort @@ -110,7 +111,9 @@ function! s:lsp_keymaps() abort nmap [g :LspDiagPrev nmap ]g :LspDiagNext nmap K :LspHover -autocmd BufWritePre LspFormat + if &filetype !=# 'vim' + autocmd BufWritePre LspFormat + endif endfunction function! s:prettier_format() abort if !executable('prettier') @@ -121,8 +124,6 @@ function! s:prettier_format() abort if v:shell_error silent undo echohl ErrorMsg | echom 'formatting failed' - else - silent! 1s///e endif call winrestview(l:view) endfunction -- cgit v1.2.3