mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 16:51:34 +02:00
update, neovim use build-in lsp
This commit is contained in:
parent
8aa92b589f
commit
fcb370ba0b
8 changed files with 152 additions and 156 deletions
|
|
@ -1,38 +1,29 @@
|
|||
# Smirnov-O <ss2316544@gmail.com>
|
||||
# BSPWM/SXKBD config file
|
||||
|
||||
## == USER keys
|
||||
super + {_,shift} Return
|
||||
#== Users hotkeys
|
||||
super + {_, shift} Return
|
||||
{kitty, rofi -show drun}
|
||||
|
||||
super + shift + {w, e, f, s, t, z, q}
|
||||
{google-chrome-stable, \
|
||||
code, \
|
||||
nemo, \
|
||||
.applications/simplenote.appimage, \
|
||||
.applications/todoist.appimage, \
|
||||
slock, \
|
||||
xkill }
|
||||
super + shift + {w, e, f, z, q}
|
||||
{google-chrome-stable, \
|
||||
code, \
|
||||
nemo, \
|
||||
slock, \
|
||||
xkill }
|
||||
|
||||
{_,shift,ctrl} Print
|
||||
{scrot -s, \
|
||||
scrot, \
|
||||
scrot -u }
|
||||
|
||||
super + {equal, minus, shift+minus}
|
||||
super + {equal, minus, shift + minus}
|
||||
amixer sset Master {2%+, 2%-, toggle}
|
||||
|
||||
Print
|
||||
flameshot gui
|
||||
|
||||
super + Escape
|
||||
.config/rofi/script/powermenu.sh
|
||||
|
||||
### == BSPWM keys
|
||||
#== BSPWM
|
||||
super + q
|
||||
bspc node -c
|
||||
|
||||
super + control + r
|
||||
bspc wm -r \
|
||||
&& pkill sxhkd \
|
||||
&& sxhkd -c ~/.config/bspwm/sxhkd
|
||||
bspc wm -r && pkill sxhkd && sxhkd -c ~/.config/bspwm/sxhkd
|
||||
|
||||
super + {_,shift + } {h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
|
|
@ -43,10 +34,7 @@ super + ctrl + {h,j,k,l}
|
|||
super + {_,shift + }{1-9}
|
||||
bspc {desktop -f,node -d} focused:'^{1-9}'
|
||||
|
||||
super + shift + {Tab, F11}
|
||||
bspc node -t {floating,fullscreen}
|
||||
|
||||
super + Tab
|
||||
bspc node -t tiled
|
||||
super + {t, f, e}
|
||||
bspc node -t {tiled, floating, fullscreen}
|
||||
|
||||
# vim: ft=sxhkdrc
|
||||
|
|
|
|||
|
|
@ -1,48 +1,55 @@
|
|||
font_family JetBrains Mono
|
||||
disable_ligatures always
|
||||
font_size 11
|
||||
repaint_delay 10
|
||||
|
||||
# Cursor
|
||||
cursor_text_color #4c566a
|
||||
cursor_shape underline
|
||||
cursor_underline_thickness 1.3
|
||||
enable_audio_bell no
|
||||
open_url_modifiers ctrl
|
||||
cursor_blink_interval 0
|
||||
|
||||
# Bell
|
||||
enable_audio_bell no
|
||||
window_alert_on_bell no
|
||||
bell_on_tab no
|
||||
## HotKeys
|
||||
map ctrl+equal change_font_size all +2
|
||||
map ctrl+minus change_font_size all -2
|
||||
map ctrl+backspace change_font_size all 0
|
||||
|
||||
# Keyboard Shortcuts
|
||||
clear_all_shortcuts yes
|
||||
open_url_modifiers ctrl
|
||||
map ctrl+shift+c copy_to_clipboard
|
||||
map ctrl+shift+v paste_from_clipboard
|
||||
map ctrl+shift+u kitten unicode_input
|
||||
map alt+k scroll_line_up
|
||||
map alt+j scroll_line_down
|
||||
map ctrl+equal change_font_size all +2.0
|
||||
map ctrl+minus change_font_size all -2.0
|
||||
map ctrl+backspace change_font_size all 0
|
||||
## Theme
|
||||
#selection_background #303030
|
||||
#selection_foreground #202020
|
||||
#background #202020
|
||||
#foreground #d0d0d0
|
||||
#cursor #d0d0d0
|
||||
#color0 #151515
|
||||
#color8 #505050
|
||||
#color1 #ac4142
|
||||
#color9 #ac4142
|
||||
#color2 #7e8d50
|
||||
#color10 #7e8d50
|
||||
#color3 #e5b566
|
||||
#color11 #e5b566
|
||||
#color4 #6c99ba
|
||||
#color12 #6c99ba
|
||||
#color5 #9e4e85
|
||||
#color13 #9e4e85
|
||||
#color6 #7dd5cf
|
||||
#color14 #7dd5cf
|
||||
#color7 #d0d0d0
|
||||
#color15 #f5f5f5
|
||||
color0 #232323
|
||||
color1 #ff000f
|
||||
color2 #8ce10b
|
||||
color3 #ffb900
|
||||
color4 #008df8
|
||||
color5 #6d43a6
|
||||
color6 #00d8eb
|
||||
color7 #ffffff
|
||||
color8 #444444
|
||||
color9 #ff2740
|
||||
color10 #abe15b
|
||||
color11 #ffd242
|
||||
color12 #0092ff
|
||||
color13 #9a5feb
|
||||
color14 #67fff0
|
||||
color15 #ffffff
|
||||
background #0e1019
|
||||
selection_foreground #0e1019
|
||||
cursor #ff0018
|
||||
foreground #fffaf4
|
||||
selection_background #fffaf4
|
||||
|
||||
# Theming
|
||||
background #f6f6f6
|
||||
foreground #2a2b33
|
||||
cursor #d8dee9
|
||||
color0 #3b4252
|
||||
color8 #4c566a
|
||||
color1 #bf616a
|
||||
color9 #bf616a
|
||||
color2 #a3be8c
|
||||
color10 #a3be8c
|
||||
color3 #ebcb8b
|
||||
color11 #ebcb8b
|
||||
color4 #81a1c1
|
||||
color12 #81a1c1
|
||||
color5 #b48ead
|
||||
color13 #b48ead
|
||||
color6 #88c0d0
|
||||
color14 #88c0d0
|
||||
color7 #e5e9f0
|
||||
color15 #e5e9f0
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"javascript.suggestionActions.enabled": false,
|
||||
"html.filetypes": ["ejs", "jst"],
|
||||
"languageserver": {
|
||||
"golang": {
|
||||
"filetypes": ["go"],
|
||||
"command": "gopls",
|
||||
"rootPatterns": ["go.mod"],
|
||||
"disableWorkspaceFolders": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
ino <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||
ino <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||
map <leader>s <Plug>(coc-rename)
|
||||
|
||||
let g:coc_global_config = "$HOME/.config/nvim/coc-settings.json"
|
||||
let g:coc_global_extensions = [
|
||||
\ "coc-tsserver",
|
||||
\ "coc-html"
|
||||
\ ]
|
||||
|
|
@ -1,25 +1,31 @@
|
|||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'Smirnov-O/nten.vim'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'neoclide/coc.nvim'
|
||||
Plug 'axvr/zepl.vim'
|
||||
" Completion && LSP
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'hrsh7th/nvim-compe'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
" Status line
|
||||
Plug 'hoob3rt/lualine.nvim'
|
||||
" Theme
|
||||
Plug 'Smirnov-O/nten.vim'
|
||||
call plug#end()
|
||||
|
||||
"== General
|
||||
colo nten-light " Color scheme
|
||||
set nu rnu cul " Line numbers & cursor highlight
|
||||
set lbr wrap " Line wrap
|
||||
set mouse=a mousehide " Mouse
|
||||
set ruler laststatus=0 " Status line
|
||||
set history=500 " Set history size
|
||||
set autoread " Auto read file on change
|
||||
set hidden " Change buffet without warning
|
||||
set visualbell t_vb= " Disable sounds
|
||||
set pumheight=8 " Maximum items in pop up
|
||||
set modeline " Enable modeline
|
||||
set nobk noswf noudf " Swap files
|
||||
set is ic scs " Search
|
||||
colo codedark " Color scheme
|
||||
set termguicolors " GUI colors
|
||||
set nu rnu cul " Line numbers & cursor highlight
|
||||
set nolbr nowrap " Line wrap
|
||||
set mouse=a mh " Mouse
|
||||
set history=500 " Set history size
|
||||
set autoread " Auto read file on change
|
||||
set hidden " Change buffet without warning
|
||||
set visualbell t_vb= " Disable sounds
|
||||
set pumheight=8 " Maximum items in pop up
|
||||
set modeline " Enable modeline
|
||||
set nobk noswf noudf " Swap files
|
||||
set is ic scs " Search
|
||||
let mapleader=";" " Set leader key
|
||||
set spr " Split
|
||||
set scrolloff=3
|
||||
set enc=utf-8 fenc=utf-8 " Encoding
|
||||
set list listchars=tab:\|·,trail:~,space:·
|
||||
|
|
@ -28,6 +34,34 @@ set list listchars=tab:\|·,trail:~,space:·
|
|||
set ts=4 sw=4 sts=4
|
||||
set sta et ai
|
||||
|
||||
"== Status line
|
||||
lua require'lualine'.setup({options = {
|
||||
\ theme = "codedark"
|
||||
\ }})
|
||||
|
||||
"== Completion(LSP)
|
||||
ino <expr> <tab> pumvisible() ? "\<C-n>" : "\<tab>"
|
||||
ino <expr> <s-tab> pumvisible() ? "\<C-p>" : "\<tab>"
|
||||
ino <expr> <CR> compe#confirm('<CR>')
|
||||
nno sr :lua vim.lsp.buf.rename()<cr>
|
||||
nno sh :lua vim.lsp.buf.hover()<cr>
|
||||
nno si :lua vim.lsp.buf.definition()<cr>
|
||||
nno sa :lua vim.lsp.buf.code_action()<cr>
|
||||
|
||||
lua << EOF
|
||||
require'lspconfig'.tsserver.setup{}
|
||||
require'lspconfig'.gopls.setup{}
|
||||
require'compe'.setup{
|
||||
enabled = true,
|
||||
autocomplete = true,
|
||||
source = {
|
||||
path = true,
|
||||
buffer = true,
|
||||
nvim_lsp = true,
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
"== Netrw file tree
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_banner = 0
|
||||
|
|
@ -36,37 +70,31 @@ let g:netrw_dirhistmax = 0
|
|||
"== Custom setting for another files
|
||||
au FileType python,elm setl sw=4 ts=4
|
||||
au FileType javascript,javascriptreact,json,yaml setl sw=2 ts=2
|
||||
au FileType go setl noet sw=4 ts=4
|
||||
|
||||
"== Custom commands
|
||||
com! -nargs=1 REpl :cal zepl#start("<args>")|winc L|se nonu nornu
|
||||
com! Prettier :sil !prettier -w %
|
||||
com! Term :vs|winc L|se nonu nornu|term
|
||||
com! Term :vs|winc L|se nonu nornu|start|term
|
||||
com! GoFmt :sil !gofmt -w %
|
||||
com! Black :sil !black %
|
||||
|
||||
"== Mapping
|
||||
let mapleader=";"
|
||||
|
||||
nn <C-s> :w<cr>
|
||||
nn <C-s> :w<cr>
|
||||
nn <space> :noh<cr>
|
||||
tno <esc> <c-\><c-n>
|
||||
|
||||
tno <esc> <c-\><c-n>
|
||||
nn <leader>t :Term<cr>
|
||||
nn <leader>r :REpl<space>
|
||||
nn <leader>e :Ex<cr>
|
||||
nn <leader>j :bn<cr>
|
||||
nn <leader>k :bp<cr>
|
||||
nn <leader>w :bd<cr>
|
||||
nn <leader>; :FZF<cr>
|
||||
|
||||
nn <C-h> :wincmd h<cr>
|
||||
nn <C-j> :wincmd j<cr>
|
||||
nn <C-k> :wincmd k<cr>
|
||||
nn <C-l> :wincmd l<cr>
|
||||
|
||||
nn cpp :ReplSend<cr>
|
||||
vn cpp :ReplSend<cr>
|
||||
nn spv :vs<cr>
|
||||
nn sph :sp<cr>
|
||||
|
||||
"== LSP(coc)
|
||||
so $HOME/.config/nvim/coc.vim
|
||||
nn spk :winc K<cr>
|
||||
nn spl :winc L<cr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue