diff options
| author | Zofia Szweda <sophies@disroot.org> | 2026-09-07 20:15:48 +0200 |
|---|---|---|
| committer | Zofia Szweda <sophies@disroot.org> | 2026-09-07 20:43:10 +0200 |
| commit | 782a2237d475234f5b9a60f70c72e9917971ef88 (patch) | |
| tree | 7e2dfec29b398204f8cfe0d835036d69599b8ce0 /vim/.vimrc | |
| parent | 318c12cd91fbdfac5ce6b1bf991724c98380beb0 (diff) | |
XMonad: add an XMonad and XMobar config
Added a config for the Xmonad (https://xmonad.org) window manager, along with its bar
Diffstat (limited to 'vim/.vimrc')
| -rw-r--r-- | vim/.vimrc | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -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('<Space>', '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 <buffer> [g :LspDiagPrev<CR> nmap <buffer> ]g :LspDiagNext<CR> nmap <buffer> K :LspHover<CR> -autocmd BufWritePre <buffer> LspFormat + if &filetype !=# 'vim' + autocmd BufWritePre <buffer> 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/<!doctype html>/<!DOCTYPE html>/e endif call winrestview(l:view) endfunction |
