Update nvim config, zsh

This commit is contained in:
Smirnov-O 2021-07-01 10:43:59 +03:00
parent f20307981c
commit c1cc0c9ebe
9 changed files with 65 additions and 72 deletions

View file

@ -24,13 +24,32 @@ require'lualine'.setup {options={
}} }}
-- GitSigns -- GitSigns
require'plug.gitsigns' require'gitsigns'.setup {
signs = {
add = {hl = 'GitSignsAdd', text = ''};
change = {hl = 'GitSignsChange', text = ''};
delete = {hl = 'GitSignsDelete', text = '_'};
topdelete = {hl = 'GitSignsDelete', text = ''};
changedelete = {hl = 'GitSignsChange', text = '~'};
};
watch_index = {interval = 1000};
current_line_blame = true,
sign_priority = 6,
update_debounce = 100,
status_formatter = nil,
use_decoration_api = true,
use_internal_diff = true,
}
-- NeoGit -- NeoGit
require'neogit'.setup {} require'neogit'.setup {}
-- NvimTree -- NvimTree
require'plug.nvimtree' vim.g.nvim_tree_side = "right"
vim.g.nvim_tree_ignore = {".git", ".cache", "node_modules", "__pycache__", "venv", "env"}
vim.g.nvim_tree_auto_close = 0
vim.g.nvim_tree_quit_on_open = 0
vim.g.nvim_tree_width = 24
-- TreeSitter -- TreeSitter
require'nvim-treesitter.configs'.setup { require'nvim-treesitter.configs'.setup {
@ -39,4 +58,14 @@ require'nvim-treesitter.configs'.setup {
} }
-- Colorizer -- Colorizer
-- require'plug.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,7 +1,4 @@
-- Python -- Python
local black = {
formatCommand = "black ${filename}", formatStdin = true
}
local flake8 = { local flake8 = {
lintCommand = "flake8 --ignore=E501 --stdin-display-name ${INPUT} -", lintCommand = "flake8 --ignore=E501 --stdin-display-name ${INPUT} -",
lintStdin = true, lintStdin = true,
@ -9,9 +6,6 @@ local flake8 = {
} }
-- Javascript -- Javascript
local prettier = {
formatCommand = "prettier --stdin-filepath ${INPUT}", formatStdin = true
}
local eslint = { local eslint = {
lintCommand = "./node_modules/.bin/eslint -f unix --stdin --stdin-filename ${INPUT}", lintCommand = "./node_modules/.bin/eslint -f unix --stdin --stdin-filename ${INPUT}",
lintIgnoreExitCode = true, lintIgnoreExitCode = true,
@ -31,15 +25,15 @@ local golint = {
-- Setup -- Setup
require"lspconfig".efm.setup { require"lspconfig".efm.setup {
init_options = {documentFormatting = true, codeAction = false}, init_options = {documentFormatting = false, codeAction = false},
filetypes = {"python", "javascript", "typescript", "go"}, filetypes = {"python", "javascript", "typescript", "go"},
settings = { settings = {
rootMarkers = {".git/"}, rootMarkers = {".git/"},
languages = { languages = {
python = {flake8, black}, python = {flake8},
javascript = {eslint, prettier}, javascript = {eslint},
typescript = {eslint, prettier}, typescript = {eslint},
go = {golint} go = {golint}
} };
} };
} }

View file

@ -1,11 +0,0 @@
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,18 +0,0 @@
require'gitsigns'.setup {
signs = {
add = {hl = 'GitSignsAdd', text = ''};
change = {hl = 'GitSignsChange', text = ''};
delete = {hl = 'GitSignsDelete', text = '_'};
topdelete = {hl = 'GitSignsDelete', text = ''};
changedelete = {hl = 'GitSignsChange', text = '~'};
};
watch_index = {
interval = 1000
};
current_line_blame = true,
sign_priority = 6,
update_debounce = 100,
status_formatter = nil,
use_decoration_api = true,
use_internal_diff = true,
}

View file

@ -1,8 +0,0 @@
local S = vim.g
-- Settings
S.nvim_tree_side = "right"
S.nvim_tree_ignore = {".git", ".cache", "node_modules", "__pycache__", "venv", "env"}
S.nvim_tree_auto_close = 0
S.nvim_tree_quit_on_open = 0
S.nvim_tree_width = 24

View file

@ -11,7 +11,7 @@ require('lspconfig').typescript.setup({
end end
end end
end end
vim.lsp.diagnostic.on_publish_diagnostics(_, _, params, client_id, _, config) vim.lsp.diagnostics.on_publish_diagnostics(_, _, params, client_id, _, config)
end, end,
}, },
}) })

View file

@ -1,5 +1,5 @@
[user] [user]
name = Smirnov Alexander name = Smirnov-O
email = ss2316544@gmail.com email = ss2316544@gmail.com
[github] [github]
@ -9,7 +9,7 @@
editor = nvim editor = nvim
[init] [init]
defaultBranch = main defaultBranch = "main"
[alias] [alias]
l = log --oneline --decorate l = log --oneline --decorate

View file

@ -1,7 +1,7 @@
{ {
"update.showReleaseNotes": false, "update.showReleaseNotes": false,
"window.menuBarVisibility": "hidden", "window.menuBarVisibility": "hidden",
"workbench.iconTheme": "vs-seti", "workbench.iconTheme": "material-icon-theme",
"workbench.sideBar.location": "right", "workbench.sideBar.location": "right",
"workbench.editor.untitled.hint": "hidden", "workbench.editor.untitled.hint": "hidden",
@ -14,7 +14,7 @@
// "editor.cursorSmoothCaretAnimation": true, // "editor.cursorSmoothCaretAnimation": true,
"editor.fontFamily": "'Jetbrains Mono', monospace", "editor.fontFamily": "'Jetbrains Mono', monospace",
"editor.hover.enabled": false, "editor.hover.enabled": false,
// "editor.lightbulb.enabled": false, // "editor.lightbulb.enabled""cSpell.userWords": ["postgres"]: false,
"editor.minimap.enabled": false, "editor.minimap.enabled": false,
"editor.smoothScrolling": true, "editor.smoothScrolling": true,
"editor.mouseWheelZoom": true, "editor.mouseWheelZoom": true,
@ -35,6 +35,7 @@
"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,
@ -51,5 +52,7 @@
"[javascript]": { "[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2 "editor.tabSize": 2
} },
"editor.suggestSelection": "first",
"cSpell.enabled": false
} }

4
zshrc
View file

@ -23,3 +23,7 @@ alias vim="nvim" vi="vim" e="$EDITOR"
alias ...="cd ../.." .3="cd ../../.." .4="cd ../../../.." alias ...="cd ../.." .3="cd ../../.." .4="cd ../../../.."
alias gor="go run" gob="go build" gog="go get" goi="go install" alias gor="go run" gob="go build" gog="go get" goi="go install"
alias pac="sudo pacman" pacs="pac -S" pacr="pac -R" pacss="pac -Ss" alias pac="sudo pacman" pacs="pac -S" pacr="pac -R" pacss="pac -Ss"
if [[ -f "/bin/exa" ]]; then
alias ls="exa -l" la="ls -a"
fi