all repos

dotfiles @ 08e75ea6e9b8b3bca550ad6a9f8f7dedfc219b35

i use rach linux btw
24 files changed, 4 insertions(+), 306 deletions(-)
remove lvim, update tmux, zsh
Author: neoteny ss2316544@gmail.com
Committed at: 2021-11-22 18:58:53 +0200
Parent: 2feea5c
M config/bspwm/polybar/polybar
···
        57
        57
         [module/archupd]

      
        58
        58
         type = custom/script

      
        59
        59
         exec = ~/.config/bspwm/polybar/scripts/updates-pacman-aur.sh

      
        60
        
        -click-left = kitty -e ~/bin/arch-upd

      
        
        60
        +click-left = alacritty -e ~/bin/arch-upd

      
        61
        61
         interval = 60

      
        62
        62
         

      
        63
        63
         [module/wifi-signal]

      
D config/lvim/config.lua
···
        1
        
        -vim.o.relativenumber = true

      
        2
        
        -

      
        3
        
        -lvim.format_on_save = true

      
        4
        
        -lvim.lint_on_save = true

      
        5
        
        -lvim.colorscheme = "onedarker"

      
        6
        
        -

      
        7
        
        --- Default fatures

      
        8
        
        -lvim.builtin.terminal.active = true

      
        9
        
        -lvim.builtin.dashboard.active = true

      
        10
        
        -lvim.builtin.dap.active = true

      
        11
        
        -

      
        12
        
        --- GitSigns

      
        13
        
        -lvim.builtin.gitsigns.opts.current_line_blame = true

      
        14
        
        -lvim.builtin.gitsigns.opts.current_line_blame_opts = { delay = 200 }

      
        15
        
        -

      
        16
        
        --- TreeSitter

      
        17
        
        -lvim.builtin.treesitter.ensure_installed = { "javascript", "typescript", "jsdoc", "yaml", "toml", "lua", "go", "gomod" }

      
        18
        
        -lvim.builtin.treesitter.indent.disable = { "python" }

      
        19
        
        -

      
        20
        
        --- Telescope

      
        21
        
        -lvim.builtin.telescope.defaults.layout_config.prompt_position = "top"

      
        22
        
        -lvim.builtin.telescope.defaults.file_ignore_patterns = { ".git", "node_modules", "target", "env", ".bin" }

      
        23
        
        -

      
        24
        
        --- NvimTree

      
        25
        
        -lvim.builtin.nvimtree.ignore = { ".git", "node_modules", ".bin", "env" }

      
        26
        
        -

      
        27
        
        --- LSP

      
        28
        
        -lvim.lsp.override = { "go", "gopls" }

      
        29
        
        -

      
        30
        
        --- Others

      
        31
        
        -require "user.plugins"

      
        32
        
        -require "user.keymaps"

      
D config/lvim/ftplugin/go.lua
···
        1
        
        -lvim.lang.go.formatters = {

      
        2
        
        -  { exe = "gofumpt" },

      
        3
        
        -  -- { exe = "gofmt" },

      
        4
        
        -  { exe = "goimports" },

      
        5
        
        -}

      
        6
        
        -

      
        7
        
        --- Debugger

      
        8
        
        -require("dap-install").config("go_delve", {})

      
D config/lvim/ftplugin/javascript.lua
···
        1
        
        -lvim.lang.javascript.formatters = {

      
        2
        
        -  -- { exe = "eslint_d" },

      
        3
        
        -  { exe = "prettierd" },

      
        4
        
        -}

      
        5
        
        -

      
        6
        
        -lvim.lang.javascript.linters = {

      
        7
        
        -  { exe = "eslint_d" },

      
        8
        
        -}

      
        9
        
        -

      
        10
        
        --- Debugger

      
        11
        
        -require("dap-install").config("jsnode", {})

      
        12
        
        -

      
        13
        
        --- Lsp

      
        14
        
        -lvim.lang.javascript.lsp.setup.handlers = {

      
        15
        
        -  ["textDocument/publishDiagnostics"] = function(_, _, p, id, _, cfg)

      
        16
        
        -    if p.diagnostics ~= nil then

      
        17
        
        -      local i = 1

      
        18
        
        -      while i <= #p.diagnostics do

      
        19
        
        -        if p.diagnostics[i].code == 80001 then

      
        20
        
        -          table.remove(p.diagnostics, i)

      
        21
        
        -        else

      
        22
        
        -          i = i + 1

      
        23
        
        -        end

      
        24
        
        -      end

      
        25
        
        -    end

      
        26
        
        -    vim.lsp.diagnostic.on_publish_diagnostics(_, _, p, id, _, cfg)

      
        27
        
        -  end,

      
        28
        
        -}

      
D config/lvim/ftplugin/lua.lua
···
        1
        
        -lvim.lang.lua.formatters = {

      
        2
        
        -  { exe = "stylua" },

      
        3
        
        -}

      
        4
        
        -

      
        5
        
        -lvim.lang.lua.linters = {

      
        6
        
        -  -- { exe = "luacheck" },

      
        7
        
        -  { exe = "selene" },

      
        8
        
        -}

      
D config/lvim/ftplugin/python.lua
···
        1
        
        -lvim.lang.python.formatters = {

      
        2
        
        -  { exe = "black" },

      
        3
        
        -  { exe = "isort" },

      
        4
        
        -}

      
        5
        
        -

      
        6
        
        -lvim.lang.python.linters = {

      
        7
        
        -  { exe = "flake8" },

      
        8
        
        -}

      
D config/lvim/ftplugin/typescript.lua
···
        1
        
        -lvim.lang.typescript.formatters = {

      
        2
        
        -  -- { exe = "eslint_d" },

      
        3
        
        -  { exe = "prettierd" },

      
        4
        
        -}

      
        5
        
        -

      
        6
        
        -lvim.lang.typescript.linters = {

      
        7
        
        -  { exe = "eslint_d" },

      
        8
        
        -}

      
D config/lvim/lsp-settings/gopls.json
···
        1
        
        -{

      
        2
        
        -  "go.logging.level": "error",

      
        3
        
        -  "go.lintOnSave": "package",

      
        4
        
        -  "go.lintTool": "golint",

      
        5
        
        -  "go.formatTool": "gofumpt"

      
        6
        
        -}

      
D config/lvim/lsp-settings/jsonls.json
···
        1
        
        -{

      
        2
        
        -  "json.schemas": [

      
        3
        
        -    {"url": "https://json.schemastore.org/package.json", "fileMatch": ["package.json"]},

      
        4
        
        -    {"url": "http://json.schemastore.org/tsconfig", "fileMatch": ["tsconfig.json", "tsconfig.*.json"]},

      
        5
        
        -    {"url": "http://json.schemastore.org/lerna", "fileMatch": ["lerna.json"]},

      
        6
        
        -    {"url": "http://json.schemastore.org/babelrc.json", "fileMatch": [".babelrc.json", ".babelrc", "babel.config.json"]},

      
        7
        
        -    {"url": "http://json.schemastore.org/eslintrc", "fileMatch": [".eslintrc.json", ".eslintrc"]},

      
        8
        
        -    {"url": "https://bucklescript.github.io/bucklescript/docson/build-schema.json", "fileMatch": ["bsconfig.json"]},

      
        9
        
        -    {"url": "http://json.schemastore.org/prettierrc", "fileMatch": [".prettierrc", ".prettierrc.json", "prettier.config.json"]},

      
        10
        
        -    {"url": "http://json.schemastore.org/now", "fileMatch": ["now.json"]},

      
        11
        
        -    {"url": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json", "fileMatch": ["openapi.json", "swagger.json"]},

      
        12
        
        -    {"url": "https://json.schemastore.org/nest-cli.json", "fileMatch": ["nest-cli.json"]},

      
        13
        
        -    {"url": "https://json.schemastore.org/nodemon.json", "fileMatch": ["nodemon.json"]}

      
        14
        
        -  ]

      
        15
        
        -}

      
D config/lvim/lsp-settings/pyright.json
···
        1
        
        -{

      
        2
        
        -  "python.analysis.typeCheckingMode": "off",

      
        3
        
        -  "python.analysis.autoImportCompletions": true,

      
        4
        
        -  "python.analysis.diagnosticMode": "workspace"

      
        5
        
        -}

      
D config/lvim/lsp-settings/yamlls.json
···
        1
        
        -{

      
        2
        
        -  "yaml.schemas": {

      
        3
        
        -    "https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json": ["docker-compose.yml", "docker-compose.yaml"],

      
        4
        
        -    "https://json.schemastore.org/yamllint.json": [".yamllint", ".yamllint.yml", ".yamllint.yaml"],

      
        5
        
        -    "https://yarnpkg.com/configuration/yarnrc.json": [".yarnrc", ".yarnrc.yml"],

      
        6
        
        -    "https://json.schemastore.org/github-action.json": ["*/.github/workflows/**/*.yml", "*/.github/workflows/**/*.yaml" ],

      
        7
        
        -    "https://json.schemastore.org/gitlab-ci.json": [".gitlab-ci.yml"],

      
        8
        
        -    "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json": ["openapi.yaml", "openapi.yml", "swagger.yml", "swagger.yal"]

      
        9
        
        -  }

      
        10
        
        -}

      
D config/lvim/lua/plug/dap.lua
···
        1
        
        -local M = {}

      
        2
        
        -

      
        3
        
        -function M.setup()

      
        4
        
        -  -- Virtual text

      
        5
        
        -  vim.g.dap_virtual_text = true

      
        6
        
        -end

      
        7
        
        -

      
        8
        
        -return M

      
D config/lvim/lua/plug/lua-dev.lua
···
        1
        
        -local M = {}

      
        2
        
        -

      
        3
        
        -function M.setup()

      
        4
        
        -  local ok, lua_dev = pcall(require, "lua-dev")

      
        5
        
        -  if not ok then

      
        6
        
        -    return

      
        7
        
        -  end

      
        8
        
        -

      
        9
        
        -  lua_dev.setup {}

      
        10
        
        -end

      
        11
        
        -

      
        12
        
        -return M

      
D config/lvim/lua/plug/tabnine.lua
···
        1
        
        -local M = {}

      
        2
        
        -

      
        3
        
        -function M.setup()

      
        4
        
        -  local ok, tabnine_cfg = pcall(require, "cmp_tabnine.config")

      
        5
        
        -  if not ok then

      
        6
        
        -    return

      
        7
        
        -  end

      
        8
        
        -

      
        9
        
        -  tabnine_cfg:setup {

      
        10
        
        -    max_lines = 1000,

      
        11
        
        -    max_num_results = 10,

      
        12
        
        -    sort = true,

      
        13
        
        -  }

      
        14
        
        -end

      
        15
        
        -

      
        16
        
        -return M

      
D config/lvim/lua/plug/todo-comment.lua
···
        1
        
        -local M = {}

      
        2
        
        -

      
        3
        
        -function M.setup()

      
        4
        
        -  local ok, todo_comments = pcall(require, "todo-comments")

      
        5
        
        -  if not ok then

      
        6
        
        -    return

      
        7
        
        -  end

      
        8
        
        -

      
        9
        
        -  todo_comments.setup {}

      
        10
        
        -end

      
        11
        
        -

      
        12
        
        -return M

      
D config/lvim/lua/plug/ts-unit.lua
···
        1
        
        -local M = {}

      
        2
        
        -

      
        3
        
        -function M.setup()

      
        4
        
        -  local ok, ts_unit = pcall(require, "ts-unit")

      
        5
        
        -  if not ok then

      
        6
        
        -    return

      
        7
        
        -  end

      
        8
        
        -

      
        9
        
        -  ts_unit.setup {

      
        10
        
        -    keymaps = true,

      
        11
        
        -  }

      
        12
        
        -end

      
        13
        
        -

      
        14
        
        -return M

      
D config/lvim/lua/plug/ultest.lua
···
        1
        
        -local M = {}

      
        2
        
        -

      
        3
        
        -function M.setup()

      
        4
        
        -  -- GOlang

      
        5
        
        -  vim.g["test#go#gotest#optiongs"] = "-v --short"

      
        6
        
        -end

      
        7
        
        -

      
        8
        
        -return M

      
D config/lvim/lua/user/keymaps.lua
···
        1
        
        -lvim.keys.insert_mode["<C-BS>"] = "<C-w>"

      
        2
        
        -lvim.keys.normal_mode["<C-w>"] = "<cmd>BufferClose<cr>"

      
        3
        
        -lvim.keys.normal_mode["<C-s>"] = "<cmd>w<cr>"

      
        4
        
        -lvim.keys.term_mode["jk"] = "<C-\\><C-n>"

      
        5
        
        -lvim.keys.visual_mode["jk"] = "<esc>"

      
        6
        
        -

      
        7
        
        --- Which key

      
        8
        
        -lvim.builtin.which_key.mappings.l.d = { "<cmd>TroubleToggle<cr>", "Diagnostics" }

      
        9
        
        -lvim.builtin.which_key.mappings.l.R = { "<cmd>TroubleToggle lsp_references<cr>", "References" }

      
        10
        
        -lvim.builtin.which_key.mappings.s.P = { "<cmd>Telescope projects<cr>", "Projects" }

      
        11
        
        -lvim.builtin.which_key.mappings["t"] = {

      
        12
        
        -  name = "Test",

      
        13
        
        -  t = { "<cmd>Ultest<cr>", "Run tests" },

      
        14
        
        -  s = { "<cmd>UltestStop<cr>", "Stop tests" },

      
        15
        
        -  c = { "<cmd>UltestClear<cr>", "Clear result" },

      
        16
        
        -  n = { "<cmd>UltestNearest<cr>", "Run test" },

      
        17
        
        -  o = { "<cmd>UltestOutput<cr>", "Show output" },

      
        18
        
        -  j = { "<Plug>(ultest-next-fail)", "Next fail" },

      
        19
        
        -  k = { "<Plug>(ultest-prev-fail)", "Prev fail" },

      
        20
        
        -}

      
        21
        
        -

      
        22
        
        --- Beffers

      
        23
        
        -lvim.keys.normal_mode["<A-0>"] = "<cmd>BufferLast<cr>"

      
        24
        
        -local fmt = string.format

      
        25
        
        -for i = 1, 9 do

      
        26
        
        -  lvim.keys.normal_mode[fmt("<A-%d>", i)] = fmt("<cmd>BufferGoto %d<cr>", i)

      
        27
        
        -end

      
D config/lvim/lua/user/plugins.lua
···
        1
        
        -lvim.plugins = {

      
        2
        
        -  { "tpope/vim-surround", keys = { "c", "y", "d" }, event = "BufRead" },

      
        3
        
        -  { "folke/trouble.nvim", cmd = "TroubleToggle" },

      
        4
        
        -  {

      
        5
        
        -    "theHamsta/nvim-dap-virtual-text",

      
        6
        
        -    after = "nvim-dap",

      
        7
        
        -    config = function()

      
        8
        
        -      require("plug.dap").setup()

      
        9
        
        -    end,

      
        10
        
        -  },

      
        11
        
        -  {

      
        12
        
        -    "kristijanhusak/orgmode.nvim",

      
        13
        
        -    ft = "org",

      
        14
        
        -    config = function()

      
        15
        
        -      require"orgmode".setup {}

      
        16
        
        -    end,

      
        17
        
        -  },

      
        18
        
        -  {

      
        19
        
        -    "folke/todo-comments.nvim",

      
        20
        
        -    event = "BufRead",

      
        21
        
        -    config = function()

      
        22
        
        -      require("plug.todo-comment").setup()

      
        23
        
        -    end,

      
        24
        
        -  },

      
        25
        
        -  {

      
        26
        
        -    "tzachar/cmp-tabnine",

      
        27
        
        -    run = "./install.sh",

      
        28
        
        -    event = "InsertEnter",

      
        29
        
        -    config = function()

      
        30
        
        -      require("plug.tabnine").setup()

      
        31
        
        -    end,

      
        32
        
        -  },

      
        33
        
        -  {

      
        34
        
        -    "folke/lua-dev.nvim",

      
        35
        
        -    ft = "lua",

      
        36
        
        -    config = function()

      
        37
        
        -      require("plug.lua-dev").setup()

      
        38
        
        -    end,

      
        39
        
        -  },

      
        40
        
        -  {

      
        41
        
        -    "Smirnov-O/ts-unit.nvim",

      
        42
        
        -    keys = { "vip", "cip", "yip", "dip" },

      
        43
        
        -    config = function()

      
        44
        
        -      require("plug.ts-unit").setup { keymaps = true }

      
        45
        
        -    end,

      
        46
        
        -  },

      
        47
        
        -  {

      
        48
        
        -    "rcarriga/vim-ultest",

      
        49
        
        -    requires = {

      
        50
        
        -      { "vim-test/vim-test", after = "vim-ultest" },

      
        51
        
        -    },

      
        52
        
        -    cmd = { "Ultest", "UltestStop", "UltestClear", "UltestNearest", "UltestOutput" },

      
        53
        
        -    run = ":UpdateRemotePlugins",

      
        54
        
        -    config = function()

      
        55
        
        -      require("plug.ultest").setup()

      
        56
        
        -    end,

      
        57
        
        -  },

      
        58
        
        -}

      
D config/lvim/selene.toml
···
        1
        
        -std="vim"

      
D config/lvim/stylua.toml
···
        1
        
        -column_width = 120

      
        2
        
        -line_endings = "Unix"

      
        3
        
        -indent_type = "Spaces"

      
        4
        
        -indent_width = 2

      
        5
        
        -quote_style = "AutoPreferDouble"

      
        6
        
        -no_call_parentheses = true

      
D config/lvim/vim.toml
···
        1
        
        -[selene]

      
        2
        
        -base = "lua52"

      
        3
        
        -name = "vim"

      
        4
        
        -

      
        5
        
        -[vim]

      
        6
        
        -any = true

      
        7
        
        -

      
        8
        
        -[lvim]

      
        9
        
        -any = true

      
M tmux.conf
···
        41
        41
         set -g status-right ' #{?client_prefix,*,} #S '

      
        42
        42
         set -g status-left ' '

      
        43
        43
         set -g status-bg default

      
        44
        
        -set -g status-fg black

      
        
        44
        +set -g status-fg colour254

      
        45
        45
         set -g status-style fg=colour110

      
        46
        46
         

      
        47
        47
         #== Pane border colors

      
M zshrc
···
        4
        4
         ## Variables

      
        5
        5
         export GOPATH="$HOME/go"

      
        6
        6
         export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.golang/bin:$GOPATH/bin:$HOME/.yarn/bin:$HOME/.luarocks/bin:$HOME/.cargo/bin:$PATH"

      
        7
        
        -export EDITOR="lvim"

      
        8
        
        -

      
        9
        
        -## FzF

      
        10
        
        -export FZF_DEFAULT_COMMAND="fd -t f -t l -E node_modules -E env -E __pycache__ -E target"

      
        
        7
        +export EDITOR="nvim"

      
        11
        8
         

      
        12
        9
         ## Oh my zsh

      
        13
        10
         plugins=(git dotenv npm yarn extract)

      ···
        28
        25
         

      
        29
        26
         ## Aliases

      
        30
        27
         alias cls="clear" cp="cp -r" mkdir="mkdir -p" open="open_command" lg="lazygit"

      
        31
        
        -alias v="nvim" vim="v"

      
        
        28
        +alias v="nvim" vim="v" m="make"

      
        32
        29
         alias ...="cd ../.." .3="cd ../../.."

      
        33
        30
         alias gor="go run" gob="go build" gog="go get" goi="go install" got="go test"

      
        34
        31
         alias n="npm" asdfi=". /opt/asdf-vm/asdf.sh"