Update bspwm, nvim, vscode, kitty

This commit is contained in:
Smirnov-O 2021-07-14 11:35:05 +03:00
parent c1cc0c9ebe
commit 43b3ba3aaa
9 changed files with 84 additions and 107 deletions

View file

@ -45,7 +45,7 @@ C urgent_border_color "#FF6C6B"
R kitty desktop='^1' focus=on follow=on R kitty desktop='^1' focus=on follow=on
R Google-chrome desktop='^2' focus=on follow=on R Google-chrome desktop='^2' focus=on follow=on
R Brave desktop='^2' focus=on follow=on R Brave desktop='^2' focus=on follow=on
R Code desktop='^3' focus=on follow=on R Code desktop='^3' focus=on follow=on state=fullscreen
R Postman desktop='^4' focus=off follow=off R Postman desktop='^4' focus=off follow=off
R Simplenote desktop='^4' focus=off follow=off R Simplenote desktop='^4' focus=off follow=off
R Zathura desktop='^4' focus=on follow=on state=tiled R Zathura desktop='^4' focus=on follow=on state=tiled

View file

@ -3,18 +3,19 @@ disable_ligatures always
enable_audio_bell no enable_audio_bell no
open_url_modifiers ctrl open_url_modifiers ctrl
cursor_blink_interval 0 cursor_blink_interval 0
tab_bar_style powerline tab_bar_edge bottom
tab_bar_style separator
tab_title_template "{index}: {title}"
# HotKeys
map ctrl+equal change_font_size all +2 map ctrl+equal change_font_size all +2
map ctrl+minus change_font_size all -2 map ctrl+minus change_font_size all -2
map ctrl+backspace change_font_size all 0 map ctrl+backspace change_font_size all 0
map ctrl+1 first_window map ctrl+alt+r load_config_file
map ctrl+2 second_window map ctrl+1 goto_tab 1
map ctrl+3 third_window map ctrl+2 goto_tab 2
map ctrl+4 fourth_window map ctrl+3 goto_tab 3
map ctrl+4 goto_tab 4
# Theme
color0 #232323 color0 #232323
color1 #ff000f color1 #ff000f
color2 #8ce10b color2 #8ce10b
@ -36,4 +37,3 @@ selection_foreground #0e1019
cursor #ff0018 cursor #ff0018
foreground #fffaf4 foreground #fffaf4
selection_background #fffaf4 selection_background #fffaf4

View file

@ -6,19 +6,21 @@ yay -S neovim-nightly-bin
``` ```
## Install plugin manager(`packer`) ## Install plugin manager(`packer`)
```bash
git clone https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
```
## Install LSP servers ## Install LSP servers
```bash ```bash
# Go(gopls) # Go(gopls)
go get golang.org/x/tools/gopls@latest go get golang.org/x/tools/gopls@latest
# Efm (linters)
go get github.com/mattn/efm-langserver
# Python(pyls) # Python(pyls)
pip install python-language-server pip install python-language-server
# JS/TS # JS/TS
nvim +"LspInstall typescript" nvim +"LspInstall typescript"
# Lua
nvim +"LspInstall lua"
``` ```

View file

@ -1,29 +1,27 @@
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'b3nj5m1n/kommentary' " Plug 'Smirnov-O/nten.vim'
Plug 'nvim-lua/plenary.nvim' Plug 'projekt0n/github-nvim-theme'
Plug 'kyazdani42/nvim-tree.lua', {'on': 'NvimTreeToggle'}
Plug 'junegunn/fzf.vim', {'on': ['Files', 'GFiles']}
" Appereance
Plug 'Smirnov-O/nten.vim'
Plug 'hoob3rt/lualine.nvim' Plug 'hoob3rt/lualine.nvim'
Plug 'romgrk/barbar.nvim' Plug 'romgrk/barbar.nvim'
" LSP Plug 'b3nj5m1n/kommentary'
Plug 'neovim/nvim-lspconfig'
Plug 'kabouzeid/nvim-lspinstall'
Plug 'hrsh7th/nvim-compe'
Plug 'jiangmiao/auto-pairs' Plug 'jiangmiao/auto-pairs'
" Git Plug 'nvim-lua/plenary.nvim'
Plug 'TimUntersberger/neogit' " Files
Plug 'lewis6991/gitsigns.nvim' Plug 'junegunn/fzf.vim', {'on': ['Files', 'GFiles']}
" Plug 'kyazdani42/nvim-tree.lua', {'on': 'NvimTreeToggle'}
" Syntax " Syntax
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" Completion
" Plug 'mattn/emmet-vim', {'on': 'EmmetInstall'} Plug 'neovim/nvim-lspconfig'
" Plug 'norcalli/nvim-colorizer.lua' Plug 'hrsh7th/nvim-compe'
Plug 'kabouzeid/nvim-lspinstall'
" Git
Plug 'lewis6991/gitsigns.nvim'
" Plug 'TimUntersberger/neogit'
call plug#end() call plug#end()
colo codedark " colo codedark
let mapleader=";" let mapleader=";"
"== Config "== Config
@ -61,15 +59,12 @@ com! Term :vs|winc L|se nonu nornu|start|term
com! GoFmt :sil !gofmt -w % com! GoFmt :sil !gofmt -w %
com! Black :sil !black % com! Black :sil !black %
"== Emmet
" let g:user_emmet_mode = 'i'
" let g:user_emmet_expandabbr_key ='<c-j>'
" au FileType html,jst,pug,vue,css,less,scss :EmmetInstall
"== Filetypes "== Filetypes
au FileType go setl noet au FileType go setl noet
au FileType javascript,yaml,json setl et ts=2 sw=2 sts=4 au FileType javascript,yaml,json setl et ts=2 sw=2 sts=4
au FileType python setl et ts=4 sw=4 sts=4 ai au FileType python setl et ts=4 sw=4 sts=4 ai
autocmd BufReadPost,FileReadPost lua require "lsp_signature".on_attach()
"== Config's "== Config's
lua require'config' lua require'config'

View file

@ -1,10 +1,14 @@
-- LSP servers require"lspinstall".setup {}
require'lspinstall'.setup {} require"lspconfig".gopls.setup {}
require'lspconfig'.gopls.setup {} -- Go -- require"lspconfig".pyls.setup {}
require'lspconfig'.pyls.setup {} -- Python -- require"lspconfig".rls.setup {}
require'lspconfig'.lua.setup {} -- Lua -- require"lspconfig".denols.setup {}
require'tsserver' -- JS/TS require"lspconfig".lua.setup{}
require'efm' -- Linter's require"tsserver"
require"efm"
-- Theme
require"github-theme".setup {}
-- Compe -- Compe
require'compe'.setup { require'compe'.setup {
@ -20,7 +24,7 @@ require'compe'.setup {
-- LuaLine -- LuaLine
require'lualine'.setup {options={ require'lualine'.setup {options={
theme = "codedark" theme = "github"
}} }}
-- GitSigns -- GitSigns
@ -41,31 +45,15 @@ require'gitsigns'.setup {
use_internal_diff = true, use_internal_diff = true,
} }
-- NeoGit
require'neogit'.setup {}
-- NvimTree -- NvimTree
vim.g.nvim_tree_side = "right" vim.g.nvim_tree_side = "right"
vim.g.nvim_tree_ignore = {".git", ".cache", "node_modules", "__pycache__", "venv", "env"} vim.g.nvim_tree_ignore = {".git", ".cache", "node_modules", "__pycache__", "env"}
vim.g.nvim_tree_auto_close = 0 -- vim.g.nvim_tree_auto_close = 0
vim.g.nvim_tree_quit_on_open = 0
vim.g.nvim_tree_width = 24 vim.g.nvim_tree_width = 24
-- TreeSitter -- TreeSitter
require'nvim-treesitter.configs'.setup { require'nvim-treesitter.configs'.setup {
ensure_installed = {'javascript', 'typescript', 'jsdoc', 'python', 'go'}; ensure_installed = {'javascript', 'typescript', 'jsdoc', 'python', 'go', 'bash'};
highlight = {enable=true}; highlight = {enable=true};
} }
-- Colorizer
require'colorizer'.setup({'*';}, {
mode = 'background';
RGB = true;
RRGGBB = true;
RRGGBBAA = false;
rgb_fn = true;
hsl_fn = false;
css = false;
css_fn = true;
names = false;
})

View file

@ -1,3 +1,5 @@
local root_pattern = require("lspconfig/util").root_pattern
require('lspconfig').typescript.setup({ require('lspconfig').typescript.setup({
handlers = { handlers = {
["textDocument/publishDiagnostics"] = function(_, _, params, client_id, _, config) ["textDocument/publishDiagnostics"] = function(_, _, params, client_id, _, config)
@ -11,7 +13,9 @@ require('lspconfig').typescript.setup({
end end
end end
end end
vim.lsp.diagnostics.on_publish_diagnostics(_, _, params, client_id, _, config) vim.lsp.diagnostic.on_publish_diagnostics(_, _, params, client_id, _, config)
end, end,
}, },
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" };
root_dir = root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git");
}) })

View file

@ -1,11 +1,9 @@
ino jk <esc>
nno <C-s> :w<cr> nno <C-s> :w<cr>
nno <C-p> :GFiles<cr> nno <C-p> :GFiles<cr>
nno <space> :noh<cr> nno <C-n> :enew<cr>
nno <leader>t :Term<cr>
nno <leader>e :NvimTreeToggle<cr>
nno <leader>; :Files<cr> nno <leader>; :Files<cr>
nno <leader>g :Neogit<cr> " nno <leader>e :NvimTreeToggle<cr>
nno <space> :noh<cr>
" Buffer " Buffer
nno <leader>j :bn<cr> nno <leader>j :bn<cr>
@ -37,10 +35,3 @@ nno spv :vs<cr>
nno sph :sp<cr> nno sph :sp<cr>
nno spk :winc K<cr> nno spk :winc K<cr>
nno spl :winc L<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>

View file

@ -1,21 +1,21 @@
{ {
"update.showReleaseNotes": false, "update.showReleaseNotes": false,
"window.menuBarVisibility": "hidden", "window.menuBarVisibility": "toggle",
"workbench.iconTheme": "material-icon-theme", "workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "GitHub Dark",
"workbench.sideBar.location": "right", "workbench.sideBar.location": "right",
"workbench.editor.untitled.hint": "hidden", "workbench.editor.untitled.hint": "hidden",
"workbench.startupEditor": "none", "workbench.startupEditor": "none",
"workbench.panel.defaultLocation": "left",
"workbench.activityBar.visible": false,
"explorer.compactFolders": false, "explorer.compactFolders": false,
"explorer.confirmDragAndDrop": false, "explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false, "explorer.confirmDelete": false,
// "editor.cursorSmoothCaretAnimation": true, // "editor.cursorSmoothCaretAnimation": true,
"editor.fontFamily": "'Jetbrains Mono', monospace", "editor.fontFamily": "'Jetbrains Mono', monospace",
"editor.hover.enabled": false, "editor.hover.enabled": true,
// "editor.lightbulb.enabled""cSpell.userWords": ["postgres"]: false,
"editor.minimap.enabled": false, "editor.minimap.enabled": false,
"editor.suggestSelection": "first",
"editor.smoothScrolling": true, "editor.smoothScrolling": true,
"editor.mouseWheelZoom": true, "editor.mouseWheelZoom": true,
"editor.formatOnPaste": false, "editor.formatOnPaste": false,
@ -24,35 +24,28 @@
"editor.wordWrap": "off", "editor.wordWrap": "off",
"editor.fontSize": 14, "editor.fontSize": 14,
"editor.tabSize": 4, "editor.tabSize": 4,
"files.insertFinalNewline": true, "files.insertFinalNewline": true,
"files.trimFinalNewlines": true, "files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true, "files.trimTrailingWhitespace": true,
"search.quickOpen.includeHistory": false, "search.quickOpen.includeHistory": false,
"gitlens.codeLens.enabled": true, "gitlens.codeLens.enabled": true,
"git.autofetch": true, "git.autofetch": true,
"git.confirmSync": false, "git.confirmSync": false,
"git.enableSmartCommit": true, "git.enableSmartCommit": true,
"cSpell.userWords": ["postgres"],
"extensions.ignoreRecommendations": true, "extensions.ignoreRecommendations": true,
"docker.showStartPage": false, "docker.showStartPage": false,
"prettier.semi": false, "prettier.semi": false,
"javascript.suggestionActions.enabled": false, "javascript.suggestionActions.enabled": false,
"typescript.suggestionActions.enabled": false, "typescript.suggestionActions.enabled": false,
"files.exclude": { "files.exclude": {
"**/.cache": true, "**/.cache": true,
"**/node_modules": true "**/node_modules": true,
"**/env": true
}, },
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"[javascript]": { "[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2 "editor.tabSize": 2
}, },
"editor.suggestSelection": "first", "vim.useSystemClipboard": true,
"cSpell.enabled": false "editor.inlineSuggest.enabled": true,
} }

4
zshrc
View file

@ -27,3 +27,7 @@ alias pac="sudo pacman" pacs="pac -S" pacr="pac -R" pacss="pac -Ss"
if [[ -f "/bin/exa" ]]; then if [[ -f "/bin/exa" ]]; then
alias ls="exa -l" la="ls -a" alias ls="exa -l" la="ls -a"
fi fi
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/sasha/.sdkman"
[[ -s "/home/sasha/.sdkman/bin/sdkman-init.sh" ]] && source "/home/sasha/.sdkman/bin/sdkman-init.sh"