diff --git a/README.org b/README.org index e147b69..e4058f4 100644 --- a/README.org +++ b/README.org @@ -71,11 +71,16 @@ A repository of my personal configuration files. - [[https://github.com/GeorgeFilipkin/pulsemixer][pulsemixer]] - [[https://www.python.org/][Python]] - [[https://github.com/dylanaraps/pywal][pywal]] +- [[https://docs.haskellstack.org/en/stable/README/][stack]] - [[https://github.com/Spotifyd/spotifyd][Spotifyd]] - [[http://www.gnu.org/software/stow/][stow]] - [[https://github.com/muennich/sxiv][sxiv]] - [[https://github.com/tldr-pages/tldr][tldr]] +- [[https://github.com/sargon/trayer-srg][trayer-srg]] - [[https://www.freedesktop.org/wiki/Software/udisks/][udisks]] +- [[https://xmobar.org/][xmobar]] +- [[https://hackage.haskell.org/package/xmonad-contrib][xmonad-contrib]] +- [[https://xmonad.org/][xmonad]] - [[https://github.com/stoeckmann/xwallpaper][xwallpaper]] - [[https://pwmt.org/projects/zathura/][zathura]] ** Fonts @@ -85,6 +90,7 @@ A repository of my personal configuration files. ** LSP Backends - [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]] - [[https://github.com/MaskRay/ccls][ccls]] +- [[https://github.com/haskell/haskell-ide-engine][haskell-ide-engine]] - [[https://github.com/felixfbecker/php-language-server][php-language-server]] - [[https://github.com/Microsoft/python-language-server][python-language-server]] - [[https://github.com/theia-ide/typescript-language-server][typescript-language-server]] @@ -141,38 +147,29 @@ A repository of my personal configuration files. ** Plugins *** General - [[https://github.com/bling/vim-bufferline][bling/vim-bufferline]] -- [[easymotion/vim-easymotion]] +- [[https://github.com/ctrlpvim/ctrlp.vim][ctrlp/ctrlp.vim]] - [[https://github.com/farmergreg/vim-lastplace][farmergreg/vim-lastplace]] -- [[https://github.com/jiangmiao/auto-pairs][jiangmiao/auto-pairs]] -- [[https://github.com/kien/ctrlp.vim][kien/ctrlp.vim]] +-[[https://github.com/junegunn/fzf][ junegunn/fzf]] +- [[https://github.com/justinmk/vim-sneak][justinmk/vim-sneak]] - [[https://github.com/mbbill/undotree][mbbill/undotree]] - [[https://github.com/mhinz/vim-signify][mhinz/vim-signify]] - [[https://github.com/myusuf3/numbers.vim][myusuf3/numbers.vim]] -- [[https://github.com/nathanaelkane/vim-indent-guides][nathanaelkane/vim-indent-guides]] - [[https://github.com/preservim/nerdtree][preservim/nerdtree]] - [[https://github.com/rhysd/conflict-marker.vim][rhysd/conflict-marker.vim]] - [[https://github.com/terryma/vim-multiple-cursors][terryma/vim-multiple-cursors]] - [[https://github.com/tpope/vim-abolish][tpope/vim-abolish]] - [[https://github.com/tpope/vim-surround][tpope/vim-surround]] - [[https://github.com/vim-airline/vim-airline][vim-airline/vim-airline]] -**** Navigation -- [[https://github.com/unblevable/quick-scope][unblevable/quick-scope]] *** Programming - [[https://github.com/airblade/vim-gitgutter][airblade/vim-gitgutter]] -- [[https://github.com/autozimu/LanguageClient-neovim][autozimu/LanguageClient-neovim]] - [[https://github.com/godlygeek/tabular][godlygeek/tabular]] - [[https://github.com/preservim/nerdcommenter][preservim/nerdcommenter]] - [[https://github.com/RRethy/vim-hexokinase][RRethy/vim-hexokinase]] -- [[https://github.com/Shougo/deoplete.nvim][Shougo/deoplete.nvim]] - [[https://github.com/tpope/vim-fugitive][tpope/vim-fugitive]] - [[https://github.com/Xuyuanp/nerdtree-git-plugin][Xuyuanp/nerdtree-git-plugin]] **** Syntax Highlighting -- [[https://github.com/HerringtonDarkholme/yats.vim][HerringtonDarkholme/yats.vim]] -- [[https://github.com/MaxMEllon/vim-jsx-pretty][maxmellon/vim-jsx-pretty]] -- [[https://github.com/vim-pandoc/vim-pandoc-syntax][vim-pandoc/vim-pandoc-syntax]] -- [[https://github.com/yuezk/vim-js][yuezk/vim-js]] -**** Tags -- [[https://github.com/majutsushi/tagbar][majutsushi/tagbar]] +- [[https://github.com/neoclide/coc.nvim][neoclice/coc.nvim]] +-[[https://github.com/Yggdroot/indentLine][ Yggdroot/indentLine]] *** UI - [[https://github.com/morhetz/gruvbox][morhetz/gruvbox]] - [[https://github.com/ryanoasis/vim-devicons][ryanoasis/vim-devicons]] diff --git a/install b/install index 307b8f7..4172ea7 100755 --- a/install +++ b/install @@ -1,10 +1,10 @@ #!/usr/bin/env fish # Prerequisite & inistalled apps -set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf go graphviz isync imagemagick lightdm-gtk-greeter mailcap deadd-notification-center-bin npm pamixer pfetch playerctl pulseaudio pulsemixer python pywal stow sxiv tldr udisks2 xwallpaper zathura +set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf go graphviz isync imagemagick lightdm-gtk-greeter mailcap deadd-notification-center-bin npm pamixer pfetch playerctl pulseaudio pulsemixer python pywal stack stow sxiv tldr trayer udisks2 xwallpaper zathura set prerequisiteFonts otf-nerd-fonts-fira-code noto-fonts ttf-unifont -set prerequisiteLsp bash-language-server ccls php-language-server python-language-server typescript-language-server vscode-css-languageserver vscode-html-languageserver nodejs-intelephense -set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf deadd-notification-center-bin mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift spotifyd-dbus-mpris sxhkd tmux tuir weechat +set prerequisiteLsp bash-language-server ccls haskell-ide-engine php-language-server python-language-server typescript-language-server vscode-css-languageserver vscode-html-languageserver nodejs-intelephense +set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf deadd-notification-center-bin mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift spotifyd-dbus-mpris sxhkd tmux tuir weechat xmobar xmonad xmonad-contrib set locales aspell-en hunspell-en_GB hunspell-en_US hunspell-nl function mkdir_if_not_exist @@ -71,6 +71,12 @@ mkdir_if_not_exist ~/.config/weechat mkdir_if_not_exist ~/.config/X11 mkdir_if_not_exist ~/.gnupg mkdir_if_not_exist ~/.config/mpv/scripts +mkdir_if_not_exist ~/.config/coc/extensions + +# Create xmonad directories +mkdir_if_not_exist ~/.config/xmonad +mkdir_if_not_exist ~/.cache/xmonad +mkdir_if_not_exist ~/.local/share/xmonad # Link mpv plugins if they don't exist if [ ! -h ~/.config/mpv/scripts/mpris.so ] @@ -118,6 +124,9 @@ end # Install Neovim plugins nvim +PlugInstall +qall +# Install Neovim coc extensions +yarn --cwd ~/.config/coc/extensions install + # Install npm packages install_npm_package_if_not_exist lighthouse diff --git a/neovim/.config/coc/extensions/package.json b/neovim/.config/coc/extensions/package.json new file mode 100644 index 0000000..7e826d7 --- /dev/null +++ b/neovim/.config/coc/extensions/package.json @@ -0,0 +1,14 @@ +{ + "dependencies": { + "coc-css": ">=1.2.3", + "coc-eslint": ">=1.2.7", + "coc-html": ">=1.2.4", + "coc-jest": ">=1.0.3", + "coc-json": ">=1.2.6", + "coc-pairs": ">=1.2.21", + "coc-prettier": ">=1.1.14", + "coc-python": ">=1.2.12", + "coc-tsserver": ">=1.5.1", + "coc-yaml": ">=1.0.4" + } +} \ No newline at end of file diff --git a/neovim/.config/nvim/coc-settings.json b/neovim/.config/nvim/coc-settings.json new file mode 100644 index 0000000..56d65ee --- /dev/null +++ b/neovim/.config/nvim/coc-settings.json @@ -0,0 +1,3 @@ +{ + "coc.preferences.formatOnSaveFiletypes": ["css", "markdown", "javascript", "javascriptreact", "typescript", "typescriptreact", "json", "yaml", "html", "graphql", "mdx"], +} diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 03a0915..9f9c415 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -17,15 +17,13 @@ Plug 'unblevable/quick-scope' " } Plug 'bling/vim-bufferline' - Plug 'easymotion/vim-easymotion' Plug 'farmergreg/vim-lastplace' - Plug 'jiangmiao/auto-pairs' Plug 'junegunn/fzf' + Plug 'justinmk/vim-sneak' Plug 'ctrlpvim/ctrlp.vim' Plug 'mbbill/undotree' Plug 'mhinz/vim-signify' Plug 'myusuf3/numbers.vim' - Plug 'nathanaelkane/vim-indent-guides' Plug 'preservim/nerdtree' Plug 'rhysd/conflict-marker.vim' Plug 'terryma/vim-multiple-cursors' @@ -36,27 +34,13 @@ " Programming { " Syntax Highlighting { - Plug 'HerringtonDarkholme/yats.vim' - Plug 'maxmellon/vim-jsx-pretty' - Plug 'vim-pandoc/vim-pandoc-syntax' - Plug 'yuezk/vim-js' + Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'Yggdroot/indentLine' " } - " Tags { - Plug 'alvan/vim-closetag' - if executable('ctags') - Plug 'majutsushi/tagbar' - endif - " } - Plug 'autozimu/LanguageClient-neovim', { - \ 'branch': 'next', - \ 'do': 'bash install.sh', - \ } Plug 'airblade/vim-gitgutter' Plug 'godlygeek/tabular' Plug 'preservim/nerdcommenter' Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } - Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'tpope/vim-fugitive' Plug 'Xuyuanp/nerdtree-git-plugin' " } @@ -127,9 +111,14 @@ vnoremap > >gv " LanguageClient-neovim - nnoremap K :call LanguageClient#textDocument_hover() - nnoremap gd :call LanguageClient#textDocument_definition() - nnoremap :call LanguageClient#textDocument_rename() + nnoremap :call LanguageClient_contextMenu() + map lk :call LanguageClient#textDocument_hover() + map lg :call LanguageClient#textDocument_definition() + map lr :call LanguageClient#textDocument_rename() + map lf :call LanguageClient#textDocument_formatting() + map lb :call LanguageClient#textDocument_references() + map la :call LanguageClient#textDocument_codeAction() + map ls :call LanguageClient#textDocument_documentSymbol() " For when you forget to sudo.. Really Write the file. cmap w!! w !sudo tee % >/dev/null @@ -156,13 +145,6 @@ map :NERDTreeToggle " } - " Tagbar { - if executable('ctags') - " Tagbar panel - map tt :TagbarToggle - endif - " } - " NerdCommenter { " Add spaces after comment delimiters by default let g:NERDSpaceDelims = 1 @@ -173,36 +155,29 @@ let g:airline_powerline_fonts=1 " } - " Deoplete { - " Load deoplete on startup - let g:deoplete#enable_at_startup = 1 - " } - - " LanguageClient-neovim { - " Required for operations modifying multiple buffers like rename. - set hidden - - " Needed for tsx files to work with typescript-language-server - " https://github.com/theia-ide/typescript-language-server/issues/90 - autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx. - - let g:LanguageClient_serverCommands = { - \ 'c': ['/usr/bin/ccls'], - \ 'javascript': ['/usr/bin/typescript-language-server', '--stdio'], - \ 'javascript.tsx': ['/usr/bin/typescript-language-server', '--stdio'], - \ 'typescript': ['/usr/bin/typescript-language-server', '--stdio'], - \ 'typescript.tsx': ['/usr/bin/typescript-language-server', '-gg/-stdio'], - \ 'php': ['/usr/bin/php-language-server'], - \ 'python': ['/usr/bin/pyls'], - \ 'sh': ['/usr/bin/bash-language-server'], - \ 'css': ['/usr/bin/css-languageserver', '--stdio'], - \ 'scss': ['/usr/bin/css-languageserver', '--stdio'], - \ 'sass': ['/usr/bin/css-languageserver', '--stdio'], - \ 'html': ['/usr/bin/html-languageserver', '--stdio'] - \ } - " } - " hexokinase { set termguicolors " } -" } + + " haskell { + autocmd BufWrite *.hs :%!stylish-haskell + " } + + " coc { + command! -nargs=0 Prettier :CocCommand prettier.formatFile + + vmap f (coc-format-selected) + nmap f (coc-format-selected) + + " Run jest for current project + command! -nargs=0 Jest :call CocAction('runCommand', 'jest.projectTest') + + " Run jest for current file + command! -nargs=0 JestCurrent :call CocAction('runCommand', 'jest.fileTest', ['%']) + + " Run jest for current test + nnoremap te :call CocAction('runCommand', 'jest.singleTest') + + " Init jest in current cwd, require global jest command exists + command! JestInit :call CocAction('runCommand', 'jest.init') + " }