From 6e3359255f445af9167b42367d9014da31ee0f6c Mon Sep 17 00:00:00 2001 From: neoteny Date: Mon, 20 Sep 2021 16:50:53 +0300 Subject: [PATCH] Update bspwm theme, lvim --- README.md | 6 +- config/bspwm/README.md | 4 +- config/bspwm/bspwmrc | 11 ++-- config/bspwm/polybar/polybar | 11 ++-- config/bspwm/sxhkd | 2 +- config/lvim/config.lua | 41 +++++++------ config/lvim/ftplugin/python.lua | 1 - config/lvim/lsp-settings/gopls.json | 3 +- config/lvim/lsp-settings/jsonls.json | 84 ++++----------------------- config/lvim/lsp-settings/pyright.json | 4 +- config/lvim/lsp-settings/yamlls.json | 39 +++---------- config/lvim/lua/user/conjure.lua | 7 --- config/lvim/lua/user/ultest.lua | 8 --- gitconfig | 2 +- zshrc | 3 +- 15 files changed, 62 insertions(+), 164 deletions(-) delete mode 100644 config/lvim/lua/user/conjure.lua delete mode 100644 config/lvim/lua/user/ultest.lua diff --git a/README.md b/README.md index 4070faa..01586e9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

dotfiles

-[](screen.png) +![](./config/bspwm/screen.png) -------------- ### System configuration @@ -23,8 +23,8 @@ yay -S rcm Install dependency: ```bash -sudo pacman -S git bspwm sxhkd dunst kitty picom rofi zsh ranger ttf-font-awesome ttf-jetbrains-mono -yay -S neovim-nightly-bin polybar +sudo pacman -S git bspwm sxhkd dunst alacritty neovim picom rofi zsh ranger ttf-font-awesome ttf-jetbrains-mono +yay -S polybar ``` And install configs: diff --git a/config/bspwm/README.md b/config/bspwm/README.md index 97dee62..8d1457a 100644 --- a/config/bspwm/README.md +++ b/config/bspwm/README.md @@ -1,10 +1,10 @@ # BSPWM -[](./screen.png) +![](./screen.png) -------------- ### Install ```bash -sudo pacman -S bspwm sxhkd kitty +sudo pacman -S bspwm sxhkd alacritty yay -S polybar ``` diff --git a/config/bspwm/bspwmrc b/config/bspwm/bspwmrc index 82e9cd5..c7e1d76 100755 --- a/config/bspwm/bspwmrc +++ b/config/bspwm/bspwmrc @@ -35,20 +35,17 @@ C single_monocle true C focus_follows_pointer true # Colors -C normal_border_color "#090909" -C active_border_color "#1F2324" -C focused_border_color "#008DCD" -C urgent_border_color "#FF6C6B" +C normal_border_color "#1f2227" +C active_border_color "#61AFEF" +C focused_border_color "#e06c75" +C urgent_border_color "#5c6370" #== BSPWM Rules R kitty desktop='^1' focus=on follow=on R Google-chrome desktop='^2' focus=on follow=on -R Brave desktop='^2' focus=on follow=on R Code desktop='^3' focus=on follow=on state=fullscreen R jetbrains-webstorm desktop='^3' focus=on follow=on R Postman 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 discord desktop='^5' focus=on follow=off R TelegramDesktop desktop='^5' focus=off follow=on R Nemo desktop='^5' focus=on follow=on diff --git a/config/bspwm/polybar/polybar b/config/bspwm/polybar/polybar index 787ee19..038a55d 100644 --- a/config/bspwm/polybar/polybar +++ b/config/bspwm/polybar/polybar @@ -4,11 +4,12 @@ enable-ipc = true format-padding = 1 [colors] -background = #202020 -foreground = #ABB2BF -cyan = #5f8ccd -alert = #D16969 -empty = #262626 +background = #1f2227 +foreground = #abb2bf +cyan = #61AFEF +alert = #e06c75 +empty = #5c6370 + [bar/bar] width = 100% diff --git a/config/bspwm/sxhkd b/config/bspwm/sxhkd index ab75d4e..8ad5d5c 100644 --- a/config/bspwm/sxhkd +++ b/config/bspwm/sxhkd @@ -1,6 +1,6 @@ #== Users hotkeys super + {_, shift} Return - {kitty, rofi -show drun} + {alacritty, rofi -show drun} super + shift + {w, e, f, z, q} {google-chrome-stable, \ diff --git a/config/lvim/config.lua b/config/lvim/config.lua index 3176613..81ea233 100644 --- a/config/lvim/config.lua +++ b/config/lvim/config.lua @@ -1,45 +1,44 @@ -lvim.leader = "space" lvim.format_on_save = false lvim.lint_on_save = false lvim.colorscheme = "onedarker" --- Terminal +-- Default fatures lvim.builtin.terminal.active = true +lvim.builtin.dashboard.active = true +lvim.builtin.dap.active = true -- GitSigns lvim.builtin.gitsigns.opts.current_line_blame = true lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 } -- TreeSitter -lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "lua" } +lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "lua", "go" } lvim.builtin.treesitter.indent.disable = { "clojure", "java", "python" } +require("user.treesitter") -- Telescope lvim.builtin.telescope.defaults.layout_config.prompt_position = "top" lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "env" } --- Debugger -lvim.builtin.dap.active = true - -- Mappings lvim.keys.normal_mode[""] = "BufferClose" lvim.keys.normal_mode[""] = "w" +lvim.builtin.which_key.mappings.l.a = { "Telescope lsp_code_actions", "Code Actions" } lvim.builtin.which_key.mappings.l.d = { "TroubleToggle", "Diagnostics" } lvim.builtin.which_key.mappings.l.R = { "TroubleToggle lsp_references", "References" } lvim.builtin.which_key.mappings["t"] = { - name = "Test", - t = { "Ultest", "Run test" }, - s = { "UltestStop", "Stop test" }, - c = { "UltestClear", "Clear test result" }, - n = { "UltestNearest", "Run test order by cursor" }, - o = { "UltestOutput", "Show output order by cursor" }, - j = { "(ultest-next-fail)", "Next fail" }, - k = { "(ultest-prev-fail)", "Prev fail" }, + name = "Test", + t = { "Ultest", "Run test" }, + s = { "UltestStop", "Stop test" }, + c = { "UltestClear", "Clear test result" }, + n = { "UltestNearest", "Run test order by cursor" }, + o = { "UltestOutput", "Show output order by cursor" }, + j = { "(ultest-next-fail)", "Next fail" }, + k = { "(ultest-prev-fail)", "Prev fail" }, } -local fmt = string.format for i = 1, 9 do - lvim.keys.normal_mode[fmt("", i)] = fmt("BufferGoto %d", i) + lvim.keys.normal_mode[string.format("", i)] = string.format("BufferGoto %d", i) end -- Pluginos @@ -50,11 +49,11 @@ lvim.plugins = { { "folke/trouble.nvim", cmd = { "TroubleToggle" } }, { "folke/todo-comments.nvim", event = "BufRead" }, { "theHamsta/nvim-dap-virtual-text", config = "require[[user.dap-virtual-text]].setup()" }, + { "vim-test/vim-test", cmd = { "TestNearest", "TestFile", "TestSuite", "TestLast", "TestVisit" } }, { - "rcarriga/vim-ultest", - config = "require[[user.ultest]].setup()", - requires = { "vim-test/vim-test" }, - cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" }, - run = ":UpdateRemotePlugins", + "rcarriga/vim-ultest", + requires = { "vim-test/vim-test" }, + cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" }, + run = ":UpdateRemotePlugins", }, } diff --git a/config/lvim/ftplugin/python.lua b/config/lvim/ftplugin/python.lua index 44652be..f799f56 100644 --- a/config/lvim/ftplugin/python.lua +++ b/config/lvim/ftplugin/python.lua @@ -1,4 +1,3 @@ -lvim.format_on_save = true lvim.lang.python.formatters = { { exe = "black" }, { exe = "isort" }, diff --git a/config/lvim/lsp-settings/gopls.json b/config/lvim/lsp-settings/gopls.json index 0a55dbc..72d65a6 100644 --- a/config/lvim/lsp-settings/gopls.json +++ b/config/lvim/lsp-settings/gopls.json @@ -1,5 +1,6 @@ { - "go.lintTool": "golint", + "go.logging.level": "error", "go.lintOnSave": "file", + "go.lintTool": "golint", "go.formatTool": "gofmt" } diff --git a/config/lvim/lsp-settings/jsonls.json b/config/lvim/lsp-settings/jsonls.json index 8f2fcae..946f11d 100644 --- a/config/lvim/lsp-settings/jsonls.json +++ b/config/lvim/lsp-settings/jsonls.json @@ -1,77 +1,15 @@ { "json.schemas": [ - { - "fileMatch": [ - "package.json" - ], - "url": "https://json.schemastore.org/package.json" - }, - { - "fileMatch": [ - "tsconfig.json", - "tsconfig.*.json" - ], - "url": "http://json.schemastore.org/tsconfig" - }, - { - "fileMatch": [ - "lerna.json" - ], - "url": "http://json.schemastore.org/lerna" - }, - { - "fileMatch": [ - ".babelrc.json", - ".babelrc", - "babel.config.json" - ], - "url": "http://json.schemastore.org/lerna" - }, - { - "fileMatch": [ - ".eslintrc.json", - ".eslintrc" - ], - "url": "http://json.schemastore.org/eslintrc" - }, - { - "fileMatch": [ - "bsconfig.json" - ], - "url": "https://bucklescript.github.io/bucklescript/docson/build-schema.json" - }, - { - "fileMatch": [ - ".prettierrc", - ".prettierrc.json", - "prettier.config.json" - ], - "url": "http://json.schemastore.org/prettierrc" - }, - { - "fileMatch": [ - "now.json" - ], - "url": "http://json.schemastore.org/now" - }, - { - "fileMatch": [ - "openapi.json", - "swagger.json" - ], - "url": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json" - }, - { - "fileMatch": [ - "nest-cli.json" - ], - "url": "https://json.schemastore.org/nest-cli.json" - }, - { - "fileMatch": [ - "nodemon.json" - ], - "url": "https://json.schemastore.org/nodemon.json" - } + {"url": "https://json.schemastore.org/package.json", "fileMatch": ["package.json"]}, + {"url": "http://json.schemastore.org/tsconfig", "fileMatch": ["tsconfig.json", "tsconfig.*.json"]}, + {"url": "http://json.schemastore.org/lerna", "fileMatch": ["lerna.json"]}, + {"url": "http://json.schemastore.org/babelrc.json", "fileMatch": [".babelrc.json", ".babelrc", "babel.config.json"]}, + {"url": "http://json.schemastore.org/eslintrc", "fileMatch": [".eslintrc.json", ".eslintrc"]}, + {"url": "https://bucklescript.github.io/bucklescript/docson/build-schema.json", "fileMatch": ["bsconfig.json"]}, + {"url": "http://json.schemastore.org/prettierrc", "fileMatch": [".prettierrc", ".prettierrc.json", "prettier.config.json"]}, + {"url": "http://json.schemastore.org/now", "fileMatch": ["now.json"]}, + {"url": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json", "fileMatch": ["openapi.json", "swagger.json"]}, + {"url": "https://json.schemastore.org/nest-cli.json", "fileMatch": ["nest-cli.json"]}, + {"url": "https://json.schemastore.org/nodemon.json", "fileMatch": ["nodemon.json"]} ] } diff --git a/config/lvim/lsp-settings/pyright.json b/config/lvim/lsp-settings/pyright.json index cc5a352..291d336 100644 --- a/config/lvim/lsp-settings/pyright.json +++ b/config/lvim/lsp-settings/pyright.json @@ -1,3 +1,5 @@ { - "python.analysis.typeCheckingMode": "off" + "python.analysis.typeCheckingMode": "off", + "python.analysis.autoImportCompletions": true, + "python.analysis.diagnosticMode": "workspace" } diff --git a/config/lvim/lsp-settings/yamlls.json b/config/lvim/lsp-settings/yamlls.json index e26fa2e..9b86baf 100644 --- a/config/lvim/lsp-settings/yamlls.json +++ b/config/lvim/lsp-settings/yamlls.json @@ -1,36 +1,11 @@ { "yaml.schemas": { - "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": [ - "docker-compose.yml", - "docker-compose.yaml" - ], - "https://json.schemastore.org/ansible-playbook.json": [ - "*/playbook/**/*.yml", - "*/playbooks/**/*.yml", - "*/playbook/**/*.yaml", - "*/playbooks/**/*.yaml" - ], - "https://json.schemastore.org/yamllint.json": [ - ".yamllint", - ".yamllint.yml", - ".yamllint.yaml" - ], - "https://yarnpkg.com/configuration/yarnrc.json": [ - ".yarnrc", - ".yarnrc.yml" - ], - "https://json.schemastore.org/github-action.json": [ - "*/.github/workflows/**/*.yml", - "*/.github/workflows/**/*.yaml" - ], - "https://json.schemastore.org/gitlab-ci.json": [ - ".gitlab-ci.yml" - ], - "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json": [ - "openapi.yaml", - "openapi.yml", - "swagger.yml", - "swagger.yal" - ] + "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": ["docker-compose.yml", "docker-compose.yaml"], + "https://json.schemastore.org/ansible-playbook.json": ["*/playbook/**/*.yml", "*/playbooks/**/*.yml", "*/playbook/**/*.yaml", "*/playbooks/**/*.yaml", "ansible-playbook.yml"], + "https://json.schemastore.org/yamllint.json": [".yamllint", ".yamllint.yml", ".yamllint.yaml"], + "https://yarnpkg.com/configuration/yarnrc.json": [".yarnrc", ".yarnrc.yml"], + "https://json.schemastore.org/github-action.json": ["*/.github/workflows/**/*.yml", "*/.github/workflows/**/*.yaml" ], + "https://json.schemastore.org/gitlab-ci.json": [".gitlab-ci.yml"], + "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json": ["openapi.yaml", "openapi.yml", "swagger.yml", "swagger.yal"] } } diff --git a/config/lvim/lua/user/conjure.lua b/config/lvim/lua/user/conjure.lua deleted file mode 100644 index bbc96bd..0000000 --- a/config/lvim/lua/user/conjure.lua +++ /dev/null @@ -1,7 +0,0 @@ -local M = {} - -M.config = function () - vim.cmd [[ let maplocalleader = "," ]] -end - -return M diff --git a/config/lvim/lua/user/ultest.lua b/config/lvim/lua/user/ultest.lua deleted file mode 100644 index 6956bdf..0000000 --- a/config/lvim/lua/user/ultest.lua +++ /dev/null @@ -1,8 +0,0 @@ -local M = {} - -M.setup = function() - -- Go - vim.g["test#go#gotest#options"] = "-v" -end - -return M diff --git a/gitconfig b/gitconfig index aad59bf..f8692ec 100644 --- a/gitconfig +++ b/gitconfig @@ -1,5 +1,5 @@ [user] - name = Smirnov-O + name = neoteny email = ss2316544@gmail.com [github] diff --git a/zshrc b/zshrc index 7293a2c..a22adec 100644 --- a/zshrc +++ b/zshrc @@ -3,7 +3,7 @@ ## Variables export GOPATH="$HOME/go" -export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.golang/bin:$GOPATH/bin:$HOME/.yarn/bin:$HOME/.luarocks/bin:$PATH" +export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.golang/bin:$GOPATH/bin:$HOME/.yarn/bin:$HOME/.luarocks/bin:$HOME/.cargo/bin:$PATH" export EDITOR="lvim" ## FzF @@ -27,6 +27,7 @@ alias cls="clear" cp="cp -r" mkdir="mkdir -p" open="open_command" lg="lazygit" alias lv="lvim" vim="lvim" alias ...="cd ../.." .3="cd ../../.." alias gor="go run" gob="go build" gog="go get" goi="go install" got="go test" +alias n="npm" if [[ -f "/bin/exa" ]]; then alias ls="exa -l" ll="ls" la="ls -a"