mirror of
https://github.com/alrayyes/dotfiles/
synced 2023-11-14 15:56:30 +00:00
Use coc in vim & haskell stuff
This commit is contained in:
parent
42f58975f8
commit
a55ccadaec
25
README.org
25
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]]
|
||||
|
15
install
15
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
|
||||
|
||||
|
14
neovim/.config/coc/extensions/package.json
Normal file
14
neovim/.config/coc/extensions/package.json
Normal file
@ -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"
|
||||
}
|
||||
}
|
3
neovim/.config/nvim/coc-settings.json
Normal file
3
neovim/.config/nvim/coc-settings.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"coc.preferences.formatOnSaveFiletypes": ["css", "markdown", "javascript", "javascriptreact", "typescript", "typescriptreact", "json", "yaml", "html", "graphql", "mdx"],
|
||||
}
|
@ -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 <silent> K :call LanguageClient#textDocument_hover()<CR>
|
||||
nnoremap <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||
nnoremap <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
||||
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
|
||||
map <Leader>lk :call LanguageClient#textDocument_hover()<CR>
|
||||
map <Leader>lg :call LanguageClient#textDocument_definition()<CR>
|
||||
map <Leader>lr :call LanguageClient#textDocument_rename()<CR>
|
||||
map <Leader>lf :call LanguageClient#textDocument_formatting()<CR>
|
||||
map <Leader>lb :call LanguageClient#textDocument_references()<CR>
|
||||
map <Leader>la :call LanguageClient#textDocument_codeAction()<CR>
|
||||
map <Leader>ls :call LanguageClient#textDocument_documentSymbol()<CR>
|
||||
|
||||
" For when you forget to sudo.. Really Write the file.
|
||||
cmap w!! w !sudo tee % >/dev/null
|
||||
@ -156,13 +145,6 @@
|
||||
map <C-e> :NERDTreeToggle<CR>
|
||||
" }
|
||||
|
||||
" Tagbar {
|
||||
if executable('ctags')
|
||||
" Tagbar panel
|
||||
map <Leader>tt :TagbarToggle<CR>
|
||||
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 <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(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 <leader>te :call CocAction('runCommand', 'jest.singleTest')<CR>
|
||||
|
||||
" Init jest in current cwd, require global jest command exists
|
||||
command! JestInit :call CocAction('runCommand', 'jest.init')
|
||||
" }
|
||||
|
Loading…
Reference in New Issue
Block a user