diff --git a/config/nvim/lua/config.lua b/config/nvim/lua/config.lua index 73df2b2..51e0f4b 100644 --- a/config/nvim/lua/config.lua +++ b/config/nvim/lua/config.lua @@ -24,13 +24,32 @@ require'lualine'.setup {options={ }} -- 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 require'neogit'.setup {} -- 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 require'nvim-treesitter.configs'.setup { @@ -39,4 +58,14 @@ require'nvim-treesitter.configs'.setup { } -- 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; +}) diff --git a/config/nvim/lua/efm.lua b/config/nvim/lua/efm.lua index d09a7b0..dddd2d0 100644 --- a/config/nvim/lua/efm.lua +++ b/config/nvim/lua/efm.lua @@ -1,7 +1,4 @@ -- Python -local black = { - formatCommand = "black ${filename}", formatStdin = true -} local flake8 = { lintCommand = "flake8 --ignore=E501 --stdin-display-name ${INPUT} -", lintStdin = true, @@ -9,9 +6,6 @@ local flake8 = { } -- Javascript -local prettier = { - formatCommand = "prettier --stdin-filepath ${INPUT}", formatStdin = true -} local eslint = { lintCommand = "./node_modules/.bin/eslint -f unix --stdin --stdin-filename ${INPUT}", lintIgnoreExitCode = true, @@ -31,15 +25,15 @@ local golint = { -- Setup require"lspconfig".efm.setup { - init_options = {documentFormatting = true, codeAction = false}, + init_options = {documentFormatting = false, codeAction = false}, filetypes = {"python", "javascript", "typescript", "go"}, settings = { rootMarkers = {".git/"}, languages = { - python = {flake8, black}, - javascript = {eslint, prettier}, - typescript = {eslint, prettier}, + python = {flake8}, + javascript = {eslint}, + typescript = {eslint}, go = {golint} - } - } + }; + }; } diff --git a/config/nvim/lua/plug/colorizer.lua b/config/nvim/lua/plug/colorizer.lua deleted file mode 100644 index fb5a83e..0000000 --- a/config/nvim/lua/plug/colorizer.lua +++ /dev/null @@ -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; -}) diff --git a/config/nvim/lua/plug/gitsigns.lua b/config/nvim/lua/plug/gitsigns.lua deleted file mode 100644 index 691441b..0000000 --- a/config/nvim/lua/plug/gitsigns.lua +++ /dev/null @@ -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, -} diff --git a/config/nvim/lua/plug/nvimtree.lua b/config/nvim/lua/plug/nvimtree.lua deleted file mode 100644 index 2c69074..0000000 --- a/config/nvim/lua/plug/nvimtree.lua +++ /dev/null @@ -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 diff --git a/config/nvim/lua/tsserver.lua b/config/nvim/lua/tsserver.lua index c1daf99..aac3687 100644 --- a/config/nvim/lua/tsserver.lua +++ b/config/nvim/lua/tsserver.lua @@ -1,17 +1,17 @@ require('lspconfig').typescript.setup({ - handlers = { - ["textDocument/publishDiagnostics"] = function(_, _, params, client_id, _, config) - if params.diagnostics ~= nil then - local idx = 1 - while idx <= #params.diagnostics do - if params.diagnostics[idx].code == 80001 then - table.remove(params.diagnostics, idx) - else - idx = idx + 1 - end - end - end - vim.lsp.diagnostic.on_publish_diagnostics(_, _, params, client_id, _, config) - end, - }, + handlers = { + ["textDocument/publishDiagnostics"] = function(_, _, params, client_id, _, config) + if params.diagnostics ~= nil then + local idx = 1 + while idx <= #params.diagnostics do + if params.diagnostics[idx].code == 80001 then + table.remove(params.diagnostics, idx) + else + idx = idx + 1 + end + end + end + vim.lsp.diagnostics.on_publish_diagnostics(_, _, params, client_id, _, config) + end, + }, }) diff --git a/gitconfig b/gitconfig index 8133e2c..aad59bf 100644 --- a/gitconfig +++ b/gitconfig @@ -1,5 +1,5 @@ [user] - name = Smirnov Alexander + name = Smirnov-O email = ss2316544@gmail.com [github] @@ -9,7 +9,7 @@ editor = nvim [init] - defaultBranch = main + defaultBranch = "main" [alias] l = log --oneline --decorate diff --git a/vscode/settings.json b/vscode/settings.json index 5839cbc..d6d09ec 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -1,7 +1,7 @@ { "update.showReleaseNotes": false, "window.menuBarVisibility": "hidden", - "workbench.iconTheme": "vs-seti", + "workbench.iconTheme": "material-icon-theme", "workbench.sideBar.location": "right", "workbench.editor.untitled.hint": "hidden", @@ -14,7 +14,7 @@ // "editor.cursorSmoothCaretAnimation": true, "editor.fontFamily": "'Jetbrains Mono', monospace", "editor.hover.enabled": false, - // "editor.lightbulb.enabled": false, + // "editor.lightbulb.enabled""cSpell.userWords": ["postgres"]: false, "editor.minimap.enabled": false, "editor.smoothScrolling": true, "editor.mouseWheelZoom": true, @@ -35,6 +35,7 @@ "git.confirmSync": false, "git.enableSmartCommit": true, + "cSpell.userWords": ["postgres"], "extensions.ignoreRecommendations": true, "docker.showStartPage": false, "prettier.semi": false, @@ -51,5 +52,7 @@ "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.tabSize": 2 - } + }, + "editor.suggestSelection": "first", + "cSpell.enabled": false } diff --git a/zshrc b/zshrc index 5db1783..6fad1b7 100644 --- a/zshrc +++ b/zshrc @@ -23,3 +23,7 @@ alias vim="nvim" vi="vim" e="$EDITOR" alias ...="cd ../.." .3="cd ../../.." .4="cd ../../../.." 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" + +if [[ -f "/bin/exa" ]]; then + alias ls="exa -l" la="ls -a" +fi