diff --git a/_backup/nvim/coc-settings.json b/_backup/nvim/coc-settings.json deleted file mode 100644 index a80f64c..0000000 --- a/_backup/nvim/coc-settings.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "pylsp.builtin.enableInstallPylspMypy": true, - "pylsp.builtin.enableInstallPylsIsort": true, - "pylsp.builtin.enableInstallPylspRope": true, - "pylsp.plugins.pyflakes.enabled": false, - "pylsp.plugins.pylint.enabled": true, - "pylsp.plugins.pylint.executable": "pylint", - "pylsp.plugins.pylint.args": [ - "--disable=line-too-long,import-error,too-many-arguments,too-many-locals,too-many-branches,too-many-lines,too-many-return-statements,fixme,too-few-public-methods,too-many-instance-attributes,too-many-statements,too-many-public-methods" - ], - "pylsp.plugins.pycodestyle.enabled": false, - "pylsp.plugins.autopep8.enabled": false, - "pylsp.plugins.flake8.enabled": true, - "pylsp.plugins.flake8.maxComplexity": 15, - "pylsp.plugins.yapf.enabled": true, - "pylsp.plugins.mccabe.enabled": false, - "pylsp.plugins.pydocstyle.enabled": true, - "pylsp.plugins.pydocstyle.convention": "google", - "pydocstring.formatter": "google", - "yaml.enable": true, - "yaml.validate": true, - "snippets.ultisnips.pythonPrompt": false -} diff --git a/_backup/nvim/init.vim b/_backup/nvim/init.vim deleted file mode 120000 index c9a3c9c..0000000 --- a/_backup/nvim/init.vim +++ /dev/null @@ -1 +0,0 @@ -vimrc \ No newline at end of file diff --git a/_backup/nvim/vimrc.d/todo-comments.lua b/_backup/nvim/vimrc.d/todo-comments.lua deleted file mode 100644 index 4bb8c47..0000000 --- a/_backup/nvim/vimrc.d/todo-comments.lua +++ /dev/null @@ -1,64 +0,0 @@ -require("todo-comments").setup({ - signs = true, -- show icons in the signs column - sign_priority = 8, -- sign priority - -- keywords recognized as todo comments - keywords = { - FIX = { - icon = " ", -- icon used for the sign, and in search results - color = "error", -- can be a hex color, or a named color (see below) - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords - -- signs = false, -- configure signs for some keywords individually - }, - TODO = { icon = " ", color = "info" }, - HACK = { icon = " ", color = "warning" }, - -- WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - -- PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - -- NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - -- TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, - }, - gui_style = { - fg = "NONE", -- The gui style to use for the fg highlight group. - bg = "BOLD", -- The gui style to use for the bg highlight group. - }, - merge_keywords = false, -- when true, custom keywords will be merged with the defaults - -- highlighting of the line containing the todo comment - -- * before: highlights before the keyword (typically comment characters) - -- * keyword: highlights of the keyword - -- * after: highlights after the keyword (todo text) - highlight = { - multiline = true, -- enable multine todo comments - multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword - multiline_context = 10, -- extra lines that will be re-evaluated when changing a line - before = "", -- "fg" or "bg" or empty - keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) - after = "fg", -- "fg" or "bg" or empty - pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex) - comments_only = true, -- uses treesitter to match keywords in comments only - max_line_len = 400, -- ignore lines longer than this - exclude = {}, -- list of file types to exclude highlighting - }, - -- list of named colors where we try to extract the guifg from the - -- list of highlight groups or use the hex color if hl not found as a fallback - colors = { - error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, - warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, - info = { "DiagnosticInfo", "#2563EB" }, - hint = { "DiagnosticHint", "#10B981" }, - default = { "Identifier", "#7C3AED" }, - test = { "Identifier", "#FF00FF" } - }, - search = { - command = "rg", - args = { - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - }, - -- regex that will be used to match keywords. - -- don't replace the (KEYWORDS) placeholder - pattern = [[\b(KEYWORDS):]], -- ripgrep regex - -- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives - }, -}) diff --git a/_backup/nvim/vimrc.d/treesitter.lua b/_backup/nvim/vimrc.d/treesitter.lua deleted file mode 100644 index d84736e..0000000 --- a/_backup/nvim/vimrc.d/treesitter.lua +++ /dev/null @@ -1,42 +0,0 @@ -require("nvim-treesitter.configs").setup({ - ensure_installed = { - "bash", - "c", - "comment", - "cpp", - "css", - "dockerfile", - "git_rebase", - "gitcommit", - "gitignore", - "go", - "gomod", - "gosum", - "hcl", - "html", - "java", - "javascript", - "json", - "lua", - "make", - "markdown", - "perl", - "rego", - "ruby", - "rust", - "sql", - "terraform", - "toml", - "tsx", - "typescript", - "vim", - "yaml", - }, - sync_install = false, - auto_install = true, - highlight = { - enable = true, - disable = { "markdown", "make"}, - additional_vim_regex_highlighting = true, - }, -}) diff --git a/_backup/nvim/vimrc.d/venv-selector.lua b/_backup/nvim/vimrc.d/venv-selector.lua deleted file mode 100644 index da240e0..0000000 --- a/_backup/nvim/vimrc.d/venv-selector.lua +++ /dev/null @@ -1,37 +0,0 @@ -local function on_venv_activate() - local command_run = false - - local function run_shell_command() - local venv = require("venv-selector").venv():match("([^/]+)$") - - if command_run == false then - local command = "workon " .. venv - vim.api.nvim_feedkeys(command .. "\n", "n", false) - command_run = true - end - end - - vim.api.nvim_create_augroup("TerminalCommands", { clear = true }) - - vim.api.nvim_create_autocmd("TermEnter", { - group = "TerminalCommands", - pattern = "*", - callback = run_shell_command, - }) - vim.print("Activated venv: " .. require("venv-selector").venv()) -end - -require("venv-selector").setup { - settings = { - options = { - on_venv_activate_callback = on_venv_activate, - notify_user_on_venv_activation = true, - }, - search = { - my_venvs = { - command = "ls -d ~/devel/venvs/*/", - }, - }, - }, -} - diff --git a/_backup/nvim/vimrc.d/zls.lua b/_backup/nvim/vimrc.d/zls.lua deleted file mode 100644 index a105d48..0000000 --- a/_backup/nvim/vimrc.d/zls.lua +++ /dev/null @@ -1,21 +0,0 @@ --- enable format-on-save from nvim-lspconfig + ZLS --- -local lspconfig = require('lspconfig') -lspconfig.zls.setup { - -- Server-specific settings. See `:help lspconfig-setup` - - -- omit the following line if `zls` is in your PATH - -- cmd = { '/path/to/zls_executable' }, - -- There are two ways to set config options: - -- - edit your `zls.json` that applies to any editor that uses ZLS - -- - set in-editor config options with the `settings` field below. - -- - -- Further information on how to configure ZLS: - -- https://github.com/zigtools/zls/wiki/Configuration - -- settings = { - -- zls = { - -- -- omit the following line if `zig` is in your PATH - -- zig_exe_path = '/path/to/zig_executable', - -- } - -- } -} diff --git a/home/any/bash/.bash_aliases b/home/any/bash/.bash_aliases index 1f82dd3..c6d60a7 100644 --- a/home/any/bash/.bash_aliases +++ b/home/any/bash/.bash_aliases @@ -18,17 +18,17 @@ fi alias k=kubectl -# Vim -if [ -x "$(command -v nvim)" ] && ! limited_terminal -then - vim_path="$(command -v vim)" - if [ -x "$vim_path" ] - then - alias vvim=$vim_path - alias vim=nvim - alias vimdiff="nvim -d" - fi -fi +## Vim +#if [ -x "$(command -v nvim)" ] && ! limited_terminal +#then +# vim_path="$(command -v vim)" +# if [ -x "$vim_path" ] +# then +# alias vvim=$vim_path +# alias vim=nvim +# alias vimdiff="nvim -d" +# fi +#fi if [ -x "$(command -v neomutt)" ] then diff --git a/home/any/neovim.dirs b/home/any/neovim.dirs new file mode 100644 index 0000000..149f8e0 --- /dev/null +++ b/home/any/neovim.dirs @@ -0,0 +1,6 @@ +.config/nvim/autoload +.config/nvim/colors +.config/nvim/plugged +.config/nvim/session +.config/nvim/spell +.var/tmp/nvim/ diff --git a/home/any/vim/.config/nvim/init.lua b/home/any/neovim/.config/nvim/init.lua similarity index 100% rename from home/any/vim/.config/nvim/init.lua rename to home/any/neovim/.config/nvim/init.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/airline.lua b/home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/airline.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/airline.lua rename to home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/airline.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/cloak.lua b/home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/cloak.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/cloak.lua rename to home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/cloak.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/local.lua b/home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/local.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/local.lua rename to home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/local.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/neotest.lua b/home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/neotest.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/neotest.lua rename to home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/neotest.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/nerdtree.lua b/home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/nerdtree.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/nerdtree.lua rename to home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/nerdtree.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/trouble.lua b/home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/trouble.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/trouble.lua rename to home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/trouble.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/vimbegood.lua b/home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/vimbegood.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/vimbegood.lua rename to home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/vimbegood.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/zenmode.lua b/home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/zenmode.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/_lazy_deact/zenmode.lua rename to home/any/neovim/.config/nvim/lua/crthaze/_lazy_deact/zenmode.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/init.lua b/home/any/neovim/.config/nvim/lua/crthaze/init.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/init.lua rename to home/any/neovim/.config/nvim/lua/crthaze/init.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/colors.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/colors.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/colors.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/colors.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/fugitive.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/fugitive.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/fugitive.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/fugitive.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/indentline.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/indentline.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/indentline.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/indentline.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/init.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/init.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/init.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/init.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/lsp.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/lsp.lua similarity index 66% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/lsp.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/lsp.lua index 7323ae6..bd2f103 100644 --- a/home/any/vim/.config/nvim/lua/crthaze/lazy/lsp.lua +++ b/home/any/neovim/.config/nvim/lua/crthaze/lazy/lsp.lua @@ -75,6 +75,52 @@ return { } } end, + pylsp = function() + local lspconfig = require("lspconfig") + lspconfig.pylsp.setup { + settings = { + pylsp = { + plugins = { + autopep8 = { enabled = false }, + mccabe = { enabled = false }, + pycodestyle = { enabled = false }, + pyflakes = { enabled = false }, + rope = { enabled = false }, + black = { + enabled = true, + }, + flake8 = { + enabled = true, + maxComplexity = 15, + }, + jedi_completion = { + fuzzy = true, + }, + pydocstyle = { + enabled = true, + convention = "google", + }, + pylint = { + enabled = true, + executable = "pylint", + args = { + "--disable=line-too-long,import-error,too-many-arguments,too-many-locals,too-many-branches,too-many-lines,too-many-return-statements,fixme,too-few-public-methods,too-many-instance-attributes,too-many-statements,too-many-public-methods", + }, + }, + pylsp_isort = { + enabled = true, + }, + pylsp_mypy = { + enabled = true, + }, + yapf = { + enabled = true, + }, + } + } + } + } + end } }) @@ -89,7 +135,7 @@ return { mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.select_prev_item(cmp_select), [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping.confirm({ select = true }), + [''] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping.complete(), }), sources = cmp.config.sources({ diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/lualine.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/lualine.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/lualine.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/lualine.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/nvim-tree.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/nvim-tree.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/nvim-tree.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/nvim-tree.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/snippets.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/snippets.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/snippets.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/snippets.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/telescope.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/telescope.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/telescope.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/telescope.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/toggleterm.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/toggleterm.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/toggleterm.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/toggleterm.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/treesitter.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/treesitter.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/treesitter.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/treesitter.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy/undotree.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy/undotree.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy/undotree.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy/undotree.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/lazy_init.lua b/home/any/neovim/.config/nvim/lua/crthaze/lazy_init.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/lazy_init.lua rename to home/any/neovim/.config/nvim/lua/crthaze/lazy_init.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/remap.lua b/home/any/neovim/.config/nvim/lua/crthaze/remap.lua similarity index 100% rename from home/any/vim/.config/nvim/lua/crthaze/remap.lua rename to home/any/neovim/.config/nvim/lua/crthaze/remap.lua diff --git a/home/any/vim/.config/nvim/lua/crthaze/set.lua b/home/any/neovim/.config/nvim/lua/crthaze/set.lua similarity index 68% rename from home/any/vim/.config/nvim/lua/crthaze/set.lua rename to home/any/neovim/.config/nvim/lua/crthaze/set.lua index 10e1815..d62d77b 100644 --- a/home/any/vim/.config/nvim/lua/crthaze/set.lua +++ b/home/any/neovim/.config/nvim/lua/crthaze/set.lua @@ -10,11 +10,10 @@ vim.opt.expandtab = false vim.opt.smartindent = true -vim.opt.wrap = false +vim.opt.wrap = true vim.opt.swapfile = false vim.opt.backup = false -vim.opt.undodir = "/.var/tmp/vim/undodir" vim.opt.undofile = true vim.opt.hlsearch = false @@ -30,8 +29,8 @@ vim.opt.updatetime = 50 vim.opt.colorcolumn = "80" -vim.opt.backupdir = os.getenv("HOME") .. "/.var/tmp/vim/backup/" -vim.opt.directory = os.getenv("HOME") .. "/.var/tmp/vim/swap/" -vim.opt.undodir = os.getenv("HOME") .. "/.var/tmp/vim/undo/" +vim.opt.backupdir = os.getenv("HOME") .. "/.var/tmp/nvim/backup/" +vim.opt.directory = os.getenv("HOME") .. "/.var/tmp/nvim/swap/" +vim.opt.undodir = os.getenv("HOME") .. "/.var/tmp/nvim/undo/" vim.opt.listchars = {tab = '⇥ ', trail = '▓'} vim.opt.list = true diff --git a/home/any/vim.dirs b/home/any/vim.dirs index 60ffa5d..ee3bf5d 100644 --- a/home/any/vim.dirs +++ b/home/any/vim.dirs @@ -1,6 +1,2 @@ -.config/nvim/autoload -.config/nvim/colors -.config/nvim/plugged -.config/nvim/session -.config/nvim/spell +.vim/ .var/tmp/vim/ diff --git a/_backup/nvim/autoload/plug.vim b/home/any/vim/.vim/autoload/plug.vim similarity index 100% rename from _backup/nvim/autoload/plug.vim rename to home/any/vim/.vim/autoload/plug.vim diff --git a/_backup/nvim/autoload/plug.vim.old b/home/any/vim/.vim/autoload/plug.vim.old similarity index 100% rename from _backup/nvim/autoload/plug.vim.old rename to home/any/vim/.vim/autoload/plug.vim.old diff --git a/_backup/nvim/bak.vimrc b/home/any/vim/.vim/bak.vimrc similarity index 100% rename from _backup/nvim/bak.vimrc rename to home/any/vim/.vim/bak.vimrc diff --git a/_backup/nvim/colors/Czar.vim b/home/any/vim/.vim/colors/Czar.vim similarity index 100% rename from _backup/nvim/colors/Czar.vim rename to home/any/vim/.vim/colors/Czar.vim diff --git a/_backup/nvim/colors/inkpot.vim b/home/any/vim/.vim/colors/inkpot.vim similarity index 100% rename from _backup/nvim/colors/inkpot.vim rename to home/any/vim/.vim/colors/inkpot.vim diff --git a/_backup/nvim/colors/srcery.vim b/home/any/vim/.vim/colors/srcery.vim similarity index 100% rename from _backup/nvim/colors/srcery.vim rename to home/any/vim/.vim/colors/srcery.vim diff --git a/_backup/nvim/colors/synthwave.vim b/home/any/vim/.vim/colors/synthwave.vim similarity index 100% rename from _backup/nvim/colors/synthwave.vim rename to home/any/vim/.vim/colors/synthwave.vim diff --git a/_backup/nvim/colors/twilight.vim b/home/any/vim/.vim/colors/twilight.vim similarity index 100% rename from _backup/nvim/colors/twilight.vim rename to home/any/vim/.vim/colors/twilight.vim diff --git a/_backup/nvim/spell/en.utf-8.add b/home/any/vim/.vim/spell/en.utf-8.add similarity index 100% rename from _backup/nvim/spell/en.utf-8.add rename to home/any/vim/.vim/spell/en.utf-8.add diff --git a/_backup/nvim/spell/en.utf-8.add.spl b/home/any/vim/.vim/spell/en.utf-8.add.spl similarity index 100% rename from _backup/nvim/spell/en.utf-8.add.spl rename to home/any/vim/.vim/spell/en.utf-8.add.spl diff --git a/_backup/nvim/vimrc b/home/any/vim/.vim/vimrc similarity index 65% rename from _backup/nvim/vimrc rename to home/any/vim/.vim/vimrc index 7061eda..8071ecc 100644 --- a/_backup/nvim/vimrc +++ b/home/any/vim/.vim/vimrc @@ -3,7 +3,7 @@ "***************************************************************************** "" Vim-Plug core "***************************************************************************** -let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim') +let vimplug_exists=expand('~/.vim/autoload/plug.vim') if has('win32')&&!has('win64') let curl_exists=expand('C:\Windows\Sysnative\curl.exe') else @@ -11,7 +11,7 @@ else endif let g:vim_bootstrap_langs = "c,go,lua,python,ruby,rust" -let g:vim_bootstrap_editor = "nvim" " nvim or vim +let g:vim_bootstrap_editor = "vim" " nvim or vim let g:vim_bootstrap_theme = "gruvbox" let g:vim_bootstrap_frams = "" @@ -29,7 +29,7 @@ if !filereadable(vimplug_exists) endif " Required: -call plug#begin(expand('~/.config/nvim/plugged')) +call plug#begin(expand('~/.vim/plugged')) "***************************************************************************** "" Plug install packages @@ -42,8 +42,6 @@ Plug 'airblade/vim-gitgutter' Plug 'vim-scripts/grep.vim' Plug 'vim-scripts/CSApprox' Plug 'Raimondi/delimitMate' -Plug 'majutsushi/tagbar' -Plug 'dense-analysis/ale' Plug 'Yggdroot/indentLine' Plug 'editor-bootstrap/vim-bootstrap-updater' Plug 'tpope/vim-rhubarb' " required by fugitive to :GBrowse @@ -52,13 +50,6 @@ Plug 'morhetz/gruvbox' if empty($VI) Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' - Plug 'psliwka/vim-smoothie' -endif -if has('nvim') - Plug 'github/copilot.vim' - Plug 'akinsho/toggleterm.nvim', {'tag' : 'v2.11.0'} - Plug 'neovim/nvim-lspconfig' - Plug 'folke/todo-comments.nvim' endif if isdirectory('/usr/local/opt/fzf') @@ -87,75 +78,12 @@ Plug 'xolox/vim-session' Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' -"***************************************************************************** -"" Custom bundles -"***************************************************************************** - -" c -Plug 'vim-scripts/c.vim', {'for': ['c', 'cpp']} -Plug 'ludwig/split-manpage.vim' - - -" go -"" Go Lang Bundle -Plug 'fatih/vim-go', {'do': ':GoInstallBinaries'} - - -" lua -"" Lua Bundle -Plug 'xolox/vim-lua-ftplugin' -Plug 'xolox/vim-lua-inspect' - - -" python -"" Python Bundle -Plug 'davidhalter/jedi-vim' -Plug 'raimon49/requirements.txt.vim', {'for': 'requirements'} - - -" ruby -Plug 'tpope/vim-rails' -Plug 'tpope/vim-rake' -Plug 'tpope/vim-projectionist' -Plug 'thoughtbot/vim-rspec' -Plug 'ecomba/vim-ruby-refactoring', {'tag': 'main'} - - -" rust -" Vim racer -Plug 'racer-rust/vim-racer' - -" Rust.vim -Plug 'rust-lang/rust.vim' - -" Async.vim -Plug 'prabirshrestha/async.vim' - -" Vim lsp -Plug 'prabirshrestha/vim-lsp' - -" Asyncomplete.vim -Plug 'prabirshrestha/asyncomplete.vim' - -" Asyncomplete lsp.vim -Plug 'prabirshrestha/asyncomplete-lsp.vim' - - -" Zig -"" Zig Bundle -Plug 'neovim/nvim-lspconfig' " https://github.com/neovim/nvim-lspconfig -Plug 'ziglang/zig.vim' " https://github.com/ziglang/zig.vim - -" Mojo -Plug 'czheo/mojo.vim' - - "***************************************************************************** "***************************************************************************** "" Include user's extra bundle -if filereadable(expand("~/.config/nvim/local_bundles.vim")) - source ~/.config/nvim/local_bundles.vim +if filereadable(expand("~/.vim/local_bundles.vim")) + source ~/.vim/local_bundles.vim endif call plug#end() @@ -177,10 +105,9 @@ set fileencodings=utf-8 set backspace=indent,eol,start "" Tabs. May be overridden by autocmd rules -set tabstop=4 +set tabstop=2 set softtabstop=0 -set shiftwidth=4 -""""""set expandtab +set shiftwidth=2 "" Map leader to , let mapleader=' ' @@ -189,7 +116,7 @@ let mapleader=' ' set hidden "" Searching -set hlsearch +set nohlsearch set incsearch set ignorecase set smartcase @@ -203,7 +130,7 @@ else endif " session management -let g:session_directory = "~/.config/nvim/session" +let g:session_directory = "~/.vim/session" let g:session_autoload = "no" let g:session_autosave = "no" let g:session_command_aliases = 1 @@ -253,8 +180,8 @@ endif "" Disable the blinking cursor. " set gcr=a:blinkon0 -au TermEnter * setlocal scrolloff=0 -au TermLeave * setlocal scrolloff=3 +" au TermEnter * setlocal scrolloff=0 +" au TermLeave * setlocal scrolloff=3 "" Status bar @@ -283,7 +210,6 @@ endif let g:airline_theme = 'powerlineish' let g:airline_powerline_fonts = 1 let g:airline#extensions#branch#enabled = 1 -let g:airline#extensions#ale#enabled = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tagbar#enabled = 1 let g:airline_skip_empty_sections = 1 @@ -451,9 +377,6 @@ let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsJumpBackwardTrigger="" let g:UltiSnipsEditSplit="vertical" -" ale -let g:ale_linters = {} - " Tagbar nmap :TagbarToggle let g:tagbar_autofocus = 1 @@ -508,206 +431,10 @@ vnoremap K :m '<-2gv=gv "" Open current line on GitHub """"""nnoremap o :.GBrowse -""" toggleterm -if has('nvim') - lua require("toggleterm").setup() - nnoremap t :ToggleTerm direction=float -endif - - "***************************************************************************** "" Custom configs "***************************************************************************** -" c -autocmd FileType c setlocal tabstop=4 shiftwidth=4 expandtab -autocmd FileType cpp setlocal tabstop=4 shiftwidth=4 expandtab - - -" go -" vim-go -" run :GoBuild or :GoTestCompile based on the go file -function! s:build_go_files() - let l:file = expand('%') - if l:file =~# '^\f\+_test\.go$' - call go#test#Test(0, 1) - elseif l:file =~# '^\f\+\.go$' - call go#cmd#Build(0) - endif -endfunction - -let g:go_list_type = "quickfix" -let g:go_fmt_command = "goimports" -let g:go_fmt_fail_silently = 1 - -let g:go_highlight_types = 1 -let g:go_highlight_fields = 1 -let g:go_highlight_functions = 1 -let g:go_highlight_methods = 1 -let g:go_highlight_operators = 1 -let g:go_highlight_build_constraints = 1 -let g:go_highlight_structs = 1 -let g:go_highlight_generate_tags = 1 -let g:go_highlight_space_tab_error = 0 -let g:go_highlight_array_whitespace_error = 0 -let g:go_highlight_trailing_whitespace_error = 0 -let g:go_highlight_extra_types = 1 - -autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 - -augroup completion_preview_close - autocmd! - if v:version > 703 || v:version == 703 && has('patch598') - autocmd CompleteDone * if !&previewwindow && &completeopt =~ 'preview' | silent! pclose | endif - endif -augroup END - -augroup go - - au! - au Filetype go command! -bang A call go#alternate#Switch(0, 'edit') - au Filetype go command! -bang AV call go#alternate#Switch(0, 'vsplit') - au Filetype go command! -bang AS call go#alternate#Switch(0, 'split') - au Filetype go command! -bang AT call go#alternate#Switch(0, 'tabe') - - au FileType go nmap dd (go-def-vertical) - au FileType go nmap dv (go-doc-vertical) - au FileType go nmap db (go-doc-browser) - - au FileType go nmap r (go-run) - au FileType go nmap gt (go-test) - au FileType go nmap ct (go-coverage-toggle) - au FileType go nmap i (go-info) - au FileType go nmap l (go-metalinter) - au FileType go nmap :GoDecls - au FileType go nmap dr :GoDeclsDir - au FileType go imap :GoDecls - au FileType go imap dr :GoDeclsDir - au FileType go nmap rb :call build_go_files() - -augroup END - -" ale -:call extend(g:ale_linters, { - \"go": ['golint', 'go vet'], }) - - -" lua - - -" python -" vim-python -augroup vimrc-python - autocmd! - autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=8 colorcolumn=79 - \ formatoptions+=croq softtabstop=4 - \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with -augroup END - -" jedi-vim -let g:jedi#popup_on_dot = 0 -let g:jedi#goto_assignments_command = "g" -let g:jedi#goto_definitions_command = "d" -let g:jedi#documentation_command = "K" -let g:jedi#usages_command = "n" -let g:jedi#rename_command = "r" -let g:jedi#show_call_signatures = "0" -let g:jedi#completions_command = "" -let g:jedi#smart_auto_mappings = 0 - -" ale -:call extend(g:ale_linters, { - \'python': ['flake8'], }) - -" vim-airline -let g:airline#extensions#virtualenv#enabled = 1 - -" Syntax highlight -let python_highlight_all = 1 - - -" ruby -let g:rubycomplete_buffer_loading = 1 -let g:rubycomplete_classes_in_global = 1 -let g:rubycomplete_rails = 1 - -augroup vimrc-ruby - autocmd! - autocmd BufNewFile,BufRead *.rb,*.rbw,*.gemspec setlocal filetype=ruby - autocmd FileType ruby set tabstop=2|set shiftwidth=2|set expandtab softtabstop=2 -augroup END - -let g:tagbar_type_ruby = { - \ 'kinds' : [ - \ 'm:modules', - \ 'c:classes', - \ 'd:describes', - \ 'C:contexts', - \ 'f:methods', - \ 'F:singleton methods' - \ ] -\ } - -" RSpec.vim mappings -"""""map t :call RunCurrentSpecFile() -map s :call RunNearestSpec() -map l :call RunLastSpec() -map a :call RunAllSpecs() - -" For ruby refactory -if has('nvim') - runtime! macros/matchit.vim -else - packadd! matchit -endif - -" Ruby refactory -nnoremap rap :RAddParameter -nnoremap rcpc :RConvertPostConditional -nnoremap rel :RExtractLet -vnoremap rec :RExtractConstant -vnoremap relv :RExtractLocalVariable -nnoremap rit :RInlineTemp -vnoremap rrlv :RRenameLocalVariable -vnoremap rriv :RRenameInstanceVariable -vnoremap rem :RExtractMethod - - -" rust -" Vim racer -au FileType rust nmap gd (rust-def) -au FileType rust nmap gs (rust-def-split) -au FileType rust nmap gx (rust-def-vertical) -au FileType rust nmap gd (rust-doc) - -au FileType rust setlocal makeprg=make - -" Zig -"disable format-on-save from `ziglang/zig.vim` -let g:zig_fmt_autosave = 0 -"don't show parse errors in a separate window - -let g:zig_fmt_parse_errors = 0 - -" ZLS uses `zig fmt` as the formatter. -" The Zig FAQ answers some questions about `zig fmt`: -" https://github.com/ziglang/zig/wiki/FAQ - -autocmd BufWritePre *.zig lua vim.lsp.buf.format() - -if has('nvim') - luafile ~/.vim/vimrc.d/zls.lua -endif - - -"***************************************************************************** -"***************************************************************************** - -"" Include user's local vim config -if filereadable(expand("~/.config/nvim/local_init.vim")) - source ~/.config/nvim/local_init.vim -endif - "***************************************************************************** "" Convenience variables "*****************************************************************************