mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Update nvim, bspwm
This commit is contained in:
parent
eb4f1a5b5a
commit
a01c2ab92c
14 changed files with 102 additions and 130 deletions
|
|
@ -42,15 +42,12 @@ C focused_border_color "#008DCD"
|
|||
C urgent_border_color "#FF6C6B"
|
||||
|
||||
#== BSPWM Rules
|
||||
R kitty desktop='^1' focus=on follow=on
|
||||
R Google-chrome desktop='^2' focus=on follow=on
|
||||
R LibreWolf desktop='^2' focus=on follow=on
|
||||
R Code desktop='^3' focus=on follow=on
|
||||
R Joplin desktop='^4' focus=on follow=on
|
||||
R Todoist desktop='^4' focus=on follow=on
|
||||
R Simplenote desktop='^4' focus=on follow=on
|
||||
R Nemo desktop='^5' focus=on follow=on
|
||||
R Zathura desktop='^5' focus=on follow=on state=tiled
|
||||
R discord desktop='^6' focus=on follow=off
|
||||
R TelegramDesktop desktop='^6' focus=off follow=on
|
||||
R kitty desktop='^1' focus=on follow=on
|
||||
R Google-chrome desktop='^2' focus=on follow=on
|
||||
R Code desktop='^3' focus=on follow=on
|
||||
R Simplenote desktop='^4' focus=on follow=on
|
||||
R Nemo desktop='^5' focus=on follow=on
|
||||
R Zathura desktop='^5' focus=on follow=on state=tiled
|
||||
R discord desktop='^6' focus=on follow=off
|
||||
R TelegramDesktop desktop='^6' focus=off follow=on
|
||||
R KeePassXC desktop='^7' focus=on follow=on
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ super + ctrl + {h,j,k,l}
|
|||
super + {_,shift + }{1-9}
|
||||
bspc {desktop -f,node -d} focused:'^{1-9}'
|
||||
|
||||
super + {t, f, e}
|
||||
super + {s, f, d}
|
||||
bspc node -t {tiled, floating, fullscreen}
|
||||
|
||||
# vim: ft=sxhkdrc
|
||||
|
|
|
|||
|
|
@ -11,84 +11,42 @@ call plug#begin('~/.vim/plugged')
|
|||
Plug 'lewis6991/gitsigns.nvim'
|
||||
" Theme
|
||||
Plug 'Smirnov-O/nten.vim'
|
||||
" Status line & Buffer line
|
||||
" Status line && Tab line
|
||||
Plug 'hoob3rt/lualine.nvim'
|
||||
Plug 'romgrk/barbar.nvim'
|
||||
" Better syntax hl
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'norcalli/nvim-colorizer.lua'
|
||||
" Editor config
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
" Other
|
||||
Plug 'vimwiki/vimwiki'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
call plug#end()
|
||||
|
||||
colo nvcode
|
||||
colo codedark
|
||||
let mapleader=";"
|
||||
|
||||
"== Tab(or spaces)
|
||||
set ts=4 sw=4 sts=4
|
||||
set sta et ai
|
||||
|
||||
"== Vim config
|
||||
source $HOME/.config/nvim/vimscript/config.vim
|
||||
|
||||
"== Tab line
|
||||
source $HOME/.config/nvim/vimscript/barbar.vim
|
||||
|
||||
"== Status line
|
||||
luafile $HOME/.config/nvim/lua/n-lualine.lua
|
||||
|
||||
"== File explorer
|
||||
luafile $HOME/.config/nvim/lua/n-nvimtree.lua
|
||||
|
||||
"== Git
|
||||
luafile $HOME/.config/nvim/lua/n-gitsigns.lua
|
||||
|
||||
"== Emmet
|
||||
source $HOME/.config/nvim/vimscript/emmet.vim
|
||||
|
||||
"== Colorizer
|
||||
luafile $HOME/.config/nvim/lua/n-colorizer.lua
|
||||
|
||||
"== Notes
|
||||
let g:vimwiki_list = [{'path': '~/notes', 'syntax': 'markdown', 'ext': '.md'}]
|
||||
|
||||
"== 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
|
||||
|
||||
|
||||
"== Custom setting for another files
|
||||
au FileType python,elm setl sw=4 ts=4
|
||||
au FileType javascript,json,yaml,lua setl sw=2 ts=2
|
||||
au FileType javascript,vue,html,css,scss :EmmetInstall
|
||||
au FileType go setl noet sw=4 ts=4
|
||||
|
||||
"== Custom commands
|
||||
com! Prettier :sil !prettier -w %
|
||||
com! Term :vs|winc L|se nonu nornu|start|term
|
||||
com! Notes :Files ~/notes
|
||||
com! GoFmt :sil !gofmt -w %
|
||||
|
||||
"== Mapping
|
||||
"== Configs
|
||||
source $HOME/.config/nvim/vimscript/config.vim
|
||||
source $HOME/.config/nvim/vimscript/barbar.vim
|
||||
source $HOME/.config/nvim/vimscript/emmet.vim
|
||||
source /home/sasha/.config/nvim/vimscript/compe.vim
|
||||
source $HOME/.config/nvim/vimscript/mappings.vim
|
||||
luafile $HOME/.config/nvim/lua/n-compe.lua
|
||||
luafile $HOME/.config/nvim/lua/n-lualine.lua
|
||||
luafile $HOME/.config/nvim/lua/n-nvimtree.lua
|
||||
luafile $HOME/.config/nvim/lua/n-gitsigns.lua
|
||||
luafile $HOME/.config/nvim/lua/n-colorizer.lua
|
||||
|
||||
"== Custom setting for another files
|
||||
au FileType python,elm setl sw=4 ts=4 sts=2
|
||||
au FileType javascript,html,vue,jst,pug,css,less,scss,json,yaml,lua setl sw=2 ts=2 sts=2
|
||||
au FileType go setl noet sw=4 ts=4 sts=2
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
require'colorizer'.setup(
|
||||
{'*';}, {
|
||||
mode = 'foreground';
|
||||
mode = 'background';
|
||||
RGB = true; -- #RGB hex codes
|
||||
RRGGBB = true; -- #RRGGBB hex codes
|
||||
RRGGBBAA = false; -- #RRGGBBAA hex codes
|
||||
|
|
|
|||
13
config/nvim/lua/n-compe.lua
Normal file
13
config/nvim/lua/n-compe.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
require'lspconfig'.tsserver.setup {}
|
||||
require'lspconfig'.gopls.setup {}
|
||||
require'lspconfig'.pyls.setup {}
|
||||
|
||||
require'compe'.setup {
|
||||
enabled = true,
|
||||
autocomplete = true,
|
||||
source = {
|
||||
path = true,
|
||||
buffer = true,
|
||||
nvim_lsp = true,
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
local S = vim.g
|
||||
|
||||
-- Settings
|
||||
S.nvim_tree_side = "right"
|
||||
S.nvim_tree_ignore = {".git", "node_modules", "venv"}
|
||||
S.nvim_tree_side = "left"
|
||||
S.nvim_tree_ignore = {".git", ".cache", "node_modules", "venv"}
|
||||
S.nvim_tree_auto_close = 0
|
||||
S.nvim_tree_quit_on_open = 0
|
||||
S.nvim_tree_width = 24
|
||||
|
|
|
|||
|
|
@ -15,3 +15,5 @@ nno <A-8> :BufferGoto 8<cr>
|
|||
nno <A-9> :BufferGoto 9<cr>
|
||||
nno <C-w> :BufferClose<cr>
|
||||
nno <S-x> :BufferClose!<cr>
|
||||
nno <leader> :BufferMoveNext<cr>
|
||||
nno <leader> :BufferMovePrevious<cr>
|
||||
|
|
|
|||
11
config/nvim/vimscript/compe.vim
Normal file
11
config/nvim/vimscript/compe.vim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
" Settings
|
||||
set completeopt=menuone,noselect
|
||||
|
||||
" Mappings
|
||||
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>
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
let g:user_emmet_mode = "in"
|
||||
let g:user_emmet_leader_key=','
|
||||
"== Config
|
||||
let g:user_emmet_mode = "i"
|
||||
let g:user_emmet_expandabbr_key ='<c-j>'
|
||||
let g:user_emmet_leader = ","
|
||||
let g:user_emmet_settings = {
|
||||
\ 'javascript': {
|
||||
\ 'extends': 'jsx'
|
||||
\ }}
|
||||
\ 'javascript': {'extends': 'jsx'}}
|
||||
|
||||
"== Auto load
|
||||
au FileType html,jst,pug,vue,css,less,scss :EmmetInstall
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
nno <C-s> :w<cr>
|
||||
nno <C-s> :w<cr>
|
||||
nno <space> :noh<cr>
|
||||
nno <leader>t :Term<cr>
|
||||
nno <leader>e :NvimTreeToggle<cr>
|
||||
|
|
@ -8,13 +8,6 @@ nno <leader>; :Files<cr>
|
|||
nno <leader>j :bn<cr>
|
||||
nno <leader>k :bp<cr>
|
||||
|
||||
" Terminal
|
||||
tno <esc> <c-\><c-n>
|
||||
tno <C-h> <c-\><cmd>:winc h<cr>
|
||||
tno <C-j> <c-\><cmd>:winc j<cr>
|
||||
tno <C-k> <c-\><cmd>:winc k<cr>
|
||||
tno <C-l> <c-\><cmd>:winc k<cr>
|
||||
|
||||
" Split
|
||||
nno <C-h> :winc h<cr>
|
||||
nno <C-j> :winc j<cr>
|
||||
|
|
@ -25,3 +18,10 @@ nno spv :vs<cr>
|
|||
nno sph :sp<cr>
|
||||
nno spk :winc K<cr>
|
||||
nno spl :winc L<cr>
|
||||
|
||||
" Terminal
|
||||
tno <esc> <c-\><c-n>
|
||||
tno <C-h> <c-\><cmd>winc h<cr>
|
||||
tno <C-j> <c-\><cmd>winc j<cr>
|
||||
tno <C-k> <c-\><cmd>winc k<cr>
|
||||
tno <C-l> <c-\><cmd>winc k<cr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue