From e078b40ca4aa4b8d3fbc6ac1cddb7920741ee29b Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sat, 24 Feb 2024 23:17:48 +0300 Subject: [PATCH] Nvim : Remove old config. --- .config/nvim/init.lua | 25 -------- .config/nvim/lua/config/Autoread.lua | 5 -- .config/nvim/lua/config/Etc.lua | 27 --------- .config/nvim/lua/config/Search.lua | 5 -- .config/nvim/lua/config/Tab.lua | 9 --- .config/nvim/lua/key/Autocomplete.lua | 7 --- .config/nvim/lua/key/Buffer.lua | 14 ----- .config/nvim/lua/key/Comment.lua | 5 -- .config/nvim/lua/key/Common.lua | 24 -------- .config/nvim/lua/key/Filetree.lua | 4 -- .config/nvim/lua/key/Fold.lua | 7 --- .config/nvim/lua/key/Gitsigns.lua | 4 -- .config/nvim/lua/key/Lsp.lua | 1 - .config/nvim/lua/key/Navigation.lua | 25 -------- .config/nvim/lua/key/Rekey.lua | 49 ---------------- .config/nvim/lua/key/Sort.lua | 4 -- .config/nvim/lua/key/Telescope.lua | 8 --- .config/nvim/lua/key/Terminal.lua | 7 --- .config/nvim/lua/key/Todo.lua | 4 -- .config/nvim/lua/key/Trouble.lua | 4 -- .config/nvim/lua/key/Update.lua | 5 -- .config/nvim/lua/key/Whichkey.lua | 4 -- .config/nvim/lua/plugin/Align.lua | 7 --- .config/nvim/lua/plugin/Autoclose.lua | 13 ---- .config/nvim/lua/plugin/Bufferline.lua | 1 - .config/nvim/lua/plugin/Closebuffers.lua | 7 --- .config/nvim/lua/plugin/Filetree.lua | 36 ------------ .config/nvim/lua/plugin/Fold.lua | 3 - .config/nvim/lua/plugin/Gitsigns.lua | 43 -------------- .config/nvim/lua/plugin/Gruvbox.lua | 1 - .config/nvim/lua/plugin/Indent.lua | 6 -- .config/nvim/lua/plugin/Init.lua | 75 ------------------------ .config/nvim/lua/plugin/Lualine.lua | 40 ------------- .config/nvim/lua/plugin/Telescope.lua | 11 ---- .config/nvim/lua/plugin/Todo.lua | 53 ----------------- .config/nvim/lua/plugin/Tokyonight.lua | 23 -------- .config/nvim/lua/plugin/Treesitter.lua | 19 ------ .config/nvim/lua/plugin/Trouble.lua | 1 - .config/nvim/lua/plugin/lsp/Init.lua | 4 -- .config/nvim/lua/plugin/lsp/Kotlin.lua | 3 - .config/nvim/lua/plugin/lsp/Python.lua | 3 - .config/nvim/lua/plugin/lsp/Rust.lua | 16 ----- .config/nvim/lua/plugin/lsp/Tex.lua | 60 ------------------- .gitignore | 5 -- 44 files changed, 677 deletions(-) delete mode 100644 .config/nvim/init.lua delete mode 100644 .config/nvim/lua/config/Autoread.lua delete mode 100644 .config/nvim/lua/config/Etc.lua delete mode 100644 .config/nvim/lua/config/Search.lua delete mode 100644 .config/nvim/lua/config/Tab.lua delete mode 100644 .config/nvim/lua/key/Autocomplete.lua delete mode 100644 .config/nvim/lua/key/Buffer.lua delete mode 100644 .config/nvim/lua/key/Comment.lua delete mode 100644 .config/nvim/lua/key/Common.lua delete mode 100644 .config/nvim/lua/key/Filetree.lua delete mode 100644 .config/nvim/lua/key/Fold.lua delete mode 100644 .config/nvim/lua/key/Gitsigns.lua delete mode 100644 .config/nvim/lua/key/Lsp.lua delete mode 100644 .config/nvim/lua/key/Navigation.lua delete mode 100644 .config/nvim/lua/key/Rekey.lua delete mode 100644 .config/nvim/lua/key/Sort.lua delete mode 100644 .config/nvim/lua/key/Telescope.lua delete mode 100644 .config/nvim/lua/key/Terminal.lua delete mode 100644 .config/nvim/lua/key/Todo.lua delete mode 100644 .config/nvim/lua/key/Trouble.lua delete mode 100644 .config/nvim/lua/key/Update.lua delete mode 100644 .config/nvim/lua/key/Whichkey.lua delete mode 100644 .config/nvim/lua/plugin/Align.lua delete mode 100644 .config/nvim/lua/plugin/Autoclose.lua delete mode 100644 .config/nvim/lua/plugin/Bufferline.lua delete mode 100644 .config/nvim/lua/plugin/Closebuffers.lua delete mode 100644 .config/nvim/lua/plugin/Filetree.lua delete mode 100644 .config/nvim/lua/plugin/Fold.lua delete mode 100644 .config/nvim/lua/plugin/Gitsigns.lua delete mode 100644 .config/nvim/lua/plugin/Gruvbox.lua delete mode 100644 .config/nvim/lua/plugin/Indent.lua delete mode 100644 .config/nvim/lua/plugin/Init.lua delete mode 100644 .config/nvim/lua/plugin/Lualine.lua delete mode 100644 .config/nvim/lua/plugin/Telescope.lua delete mode 100644 .config/nvim/lua/plugin/Todo.lua delete mode 100644 .config/nvim/lua/plugin/Tokyonight.lua delete mode 100644 .config/nvim/lua/plugin/Treesitter.lua delete mode 100644 .config/nvim/lua/plugin/Trouble.lua delete mode 100644 .config/nvim/lua/plugin/lsp/Init.lua delete mode 100644 .config/nvim/lua/plugin/lsp/Kotlin.lua delete mode 100644 .config/nvim/lua/plugin/lsp/Python.lua delete mode 100644 .config/nvim/lua/plugin/lsp/Rust.lua delete mode 100644 .config/nvim/lua/plugin/lsp/Tex.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index ee29733..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,25 +0,0 @@ -require("key/Leader") - -require("plugin/Init") - -require("config/Autoread") -require("config/Etc") -require("config/Search") -require("config/Tab") - -require("key/Autocomplete") -require("key/Buffer") -require("key/Comment") -require("key/Common") -require("key/Filetree") -require("key/Fold") -require("key/Gitsigns") -require("key/Lsp") -require("key/Navigation") -require("key/Sort") -require("key/Telescope") -require("key/Terminal") -require("key/Todo") -require("key/Trouble") -require("key/Update") -require("key/Whichkey") diff --git a/.config/nvim/lua/config/Autoread.lua b/.config/nvim/lua/config/Autoread.lua deleted file mode 100644 index bc9a40c..0000000 --- a/.config/nvim/lua/config/Autoread.lua +++ /dev/null @@ -1,5 +0,0 @@ -vim.o.autoread = true -vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "CursorHoldI", "FocusGained" }, { - command = "if mode() != 'c' | checktime | endif", - pattern = { "*" }, -}) diff --git a/.config/nvim/lua/config/Etc.lua b/.config/nvim/lua/config/Etc.lua deleted file mode 100644 index 9d6ae87..0000000 --- a/.config/nvim/lua/config/Etc.lua +++ /dev/null @@ -1,27 +0,0 @@ --- TODO: Add comments and separate files. -vim.opt.clipboard = "unnamedplus" --- vim.opt.completeopt = "menuone,noselect" -vim.opt.cursorline = true -vim.opt.fixeol = false -vim.opt.number = true -vim.opt.splitbelow = true -vim.opt.splitright = true -vim.opt.termguicolors = true -vim.opt.ttyfast = true -vim.opt.wildmode = "longest,list" - --- Disable continuing comments on newline. -vim.cmd("autocmd BufEnter * set fo-=c fo-=r fo-=o") - --- Disable mouse. -vim.cmd("set mouse=") - --- Disable signs for diagnostics. -vim.diagnostic.config({ signs = false }) - --- Display invisible characters. --- vim.cmd("set list listchars=tab:>\\ ,trail:-,eol:,lead:.") -vim.cmd("set list listchars=tab:>\\ ,trail:-,lead:.") - --- Relative line numbers. -vim.wo.relativenumber = true diff --git a/.config/nvim/lua/config/Search.lua b/.config/nvim/lua/config/Search.lua deleted file mode 100644 index 08e709e..0000000 --- a/.config/nvim/lua/config/Search.lua +++ /dev/null @@ -1,5 +0,0 @@ -vim.opt.hlsearch = true -vim.opt.ignorecase = true -vim.opt.incsearch = true -vim.opt.showmatch = true -vim.opt.smartcase = true diff --git a/.config/nvim/lua/config/Tab.lua b/.config/nvim/lua/config/Tab.lua deleted file mode 100644 index ef4af91..0000000 --- a/.config/nvim/lua/config/Tab.lua +++ /dev/null @@ -1,9 +0,0 @@ -vim.opt.autoindent = true -vim.opt.expandtab = false -vim.opt.shiftwidth = 2 --- vim.opt.smartindent = true -vim.opt.softtabstop = 2 -vim.opt.tabstop = 2 - --- Disable Markdown forced formatting. -vim.g.markdown_recommended_style = 0 diff --git a/.config/nvim/lua/key/Autocomplete.lua b/.config/nvim/lua/key/Autocomplete.lua deleted file mode 100644 index dca6c7b..0000000 --- a/.config/nvim/lua/key/Autocomplete.lua +++ /dev/null @@ -1,7 +0,0 @@ -require("key/Rekey") - --- Autocomplete. -rekey_input("", "") - --- LSP autocomplete. -rekey_normal("", "lua vim.lsp.buf.code_action()") diff --git a/.config/nvim/lua/key/Buffer.lua b/.config/nvim/lua/key/Buffer.lua deleted file mode 100644 index c939b21..0000000 --- a/.config/nvim/lua/key/Buffer.lua +++ /dev/null @@ -1,14 +0,0 @@ -require("key/Rekey") - --- New empty buffer. -remap_normal("n", "enew") - --- Close buffer. -function _buf_close() - pcall(vim.cmd, "w") - vim.cmd[[bp|sp|bn|bd!]] -end -rekey_normal("x", "lua _buf_close()") - --- Close all hidden buffers. -rekey_normal("X", "BDelete hidden") diff --git a/.config/nvim/lua/key/Comment.lua b/.config/nvim/lua/key/Comment.lua deleted file mode 100644 index 3991e1d..0000000 --- a/.config/nvim/lua/key/Comment.lua +++ /dev/null @@ -1,5 +0,0 @@ --- Toggle comment for the selected line. -vim.keymap.set("n", "/", require("SingleComment").SingleComment, { expr = true }) - --- Toggle comments for multiple lines. -vim.keymap.set("v", "/", require("SingleComment").Comment, {}) diff --git a/.config/nvim/lua/key/Common.lua b/.config/nvim/lua/key/Common.lua deleted file mode 100644 index 0bc08c5..0000000 --- a/.config/nvim/lua/key/Common.lua +++ /dev/null @@ -1,24 +0,0 @@ -require("key/Rekey") - --- Write all we can and exit. Created this to drop non-writable stuff when piping to nvim. -function bye() - pcall(vim.cmd, "wa") - vim.cmd[[qa!]] -end - --- Repeat previous command. -rekey_normal(".", "@:") -rekey_visual(".", "@:") - --- Save everything. -rekey_normal("zz", "wa") - --- Save all we can and leave. -rekey_normal("z", "lua bye()") - --- Compatibility alias for visual selection. -rekey_normal("v", "v") - --- Remap ; to :. -rekey_normal(";", ":") -rekey_visual(";", ":") diff --git a/.config/nvim/lua/key/Filetree.lua b/.config/nvim/lua/key/Filetree.lua deleted file mode 100644 index 281fd7f..0000000 --- a/.config/nvim/lua/key/Filetree.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("key/Rekey") - --- Toggle file tree. -rekey_normal("1", "NvimTreeToggle") diff --git a/.config/nvim/lua/key/Fold.lua b/.config/nvim/lua/key/Fold.lua deleted file mode 100644 index d34e3a7..0000000 --- a/.config/nvim/lua/key/Fold.lua +++ /dev/null @@ -1,7 +0,0 @@ -require("key/Rekey") - --- Toggle fold under cursor. -remap_normal("o", "za") - --- Fold everything. -remap_normal("O", "zM") diff --git a/.config/nvim/lua/key/Gitsigns.lua b/.config/nvim/lua/key/Gitsigns.lua deleted file mode 100644 index 735c054..0000000 --- a/.config/nvim/lua/key/Gitsigns.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("key/Rekey") - --- Toggle Git inspection mode. -rekey_normal("g", "Gitsigns toggle_current_line_blameGitsigns toggle_word_diffGitsigns toggle_linehl") diff --git a/.config/nvim/lua/key/Lsp.lua b/.config/nvim/lua/key/Lsp.lua deleted file mode 100644 index da57c15..0000000 --- a/.config/nvim/lua/key/Lsp.lua +++ /dev/null @@ -1 +0,0 @@ -require("key/Rekey") diff --git a/.config/nvim/lua/key/Navigation.lua b/.config/nvim/lua/key/Navigation.lua deleted file mode 100644 index 27388f2..0000000 --- a/.config/nvim/lua/key/Navigation.lua +++ /dev/null @@ -1,25 +0,0 @@ -require("key/Rekey") - --- Switch windows. -rekey_normal("a", "h") -rekey_normal("d", "l") -rekey_normal("s", "j") -rekey_normal("w", "k") - --- Switch buffers. -rekey_normal("E", "BufferLineMoveNext") -rekey_normal("Q", "BufferLineMovePrev") -rekey_normal("e", "BufferLineCycleNext") -rekey_normal("q", "BufferLineCyclePrev") - --- Splits. -rekey_normal("\\", "vsplit") -rekey_normal("-", "split") -rekey_normal("=", "=") -- Equalize split sizes. -rekey_normal("c", "q") -- Close split. - --- Resize splits. -rekey_normal("A", "4<") -rekey_normal("D", "4>") -rekey_normal("S", "2+") -rekey_normal("W", "2-") diff --git a/.config/nvim/lua/key/Rekey.lua b/.config/nvim/lua/key/Rekey.lua deleted file mode 100644 index 314e975..0000000 --- a/.config/nvim/lua/key/Rekey.lua +++ /dev/null @@ -1,49 +0,0 @@ --- Base rekey function. -local function rekey(t, key, command) - vim.api.nvim_set_keymap(t, key, command, { noremap = true }) -end - --- Base remap function. -local function remap(t, key, command) - vim.api.nvim_set_keymap(t, key, command, { noremap = false }) -end - --- Rekey in normal mode. -function rekey_normal(key, command) - rekey("n", key, command) -end - --- Rekey in input mode. -function rekey_input(key, command) - rekey("i", key, command) -end - --- Rekey in visual mode. -function rekey_visual(key, command) - rekey("v", key, command) -end - --- Rekey in terminal mode. -function rekey_terminal(key, command) - rekey("t", key, command) -end - --- Remap in normal mode. -function remap_normal(key, command) - remap("n", key, command) -end - --- Remap in input mode. -function remap_input(key, command) - remap("i", key, command) -end - --- Remap in visual mode. -function remap_visual(key, command) - remap("v", key, command) -end - --- Remap in terminal mode. -function remap_terminal(key, command) - remap("t", key, command) -end diff --git a/.config/nvim/lua/key/Sort.lua b/.config/nvim/lua/key/Sort.lua deleted file mode 100644 index 477b3fb..0000000 --- a/.config/nvim/lua/key/Sort.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("key/Rekey") - --- Sort visual selection alphabetically. -rekey_visual("A", ":'<,'>sort") diff --git a/.config/nvim/lua/key/Telescope.lua b/.config/nvim/lua/key/Telescope.lua deleted file mode 100644 index 6c2c257..0000000 --- a/.config/nvim/lua/key/Telescope.lua +++ /dev/null @@ -1,8 +0,0 @@ -require("key/Rekey") - -rekey_normal("fa", "Telescope") -rekey_normal("fb", "lua require('telescope.builtin').buffers()") -rekey_normal("ff", "lua require('telescope.builtin').find_files()") -rekey_normal("fg", "lua require('telescope.builtin').live_grep()") -rekey_normal("fh", "lua require('telescope.builtin').help_tags()") -rekey_normal("ft", "Telescope treesitter") diff --git a/.config/nvim/lua/key/Terminal.lua b/.config/nvim/lua/key/Terminal.lua deleted file mode 100644 index bd384e0..0000000 --- a/.config/nvim/lua/key/Terminal.lua +++ /dev/null @@ -1,7 +0,0 @@ -require("key/Rekey") - --- Open terminal window. -rekey_normal("4", "terminal") - --- Detach from terminal with Esc key. -rekey_terminal("", "") diff --git a/.config/nvim/lua/key/Todo.lua b/.config/nvim/lua/key/Todo.lua deleted file mode 100644 index 58a9b33..0000000 --- a/.config/nvim/lua/key/Todo.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("key/Rekey") - --- Toggle To-do window. -rekey_normal("3", "TroubleToggle todo") diff --git a/.config/nvim/lua/key/Trouble.lua b/.config/nvim/lua/key/Trouble.lua deleted file mode 100644 index f67cf42..0000000 --- a/.config/nvim/lua/key/Trouble.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("key/Rekey") - --- Toggle diagnostics window. -rekey_normal("2", "TroubleToggle document_diagnostics") diff --git a/.config/nvim/lua/key/Update.lua b/.config/nvim/lua/key/Update.lua deleted file mode 100644 index f2fcca6..0000000 --- a/.config/nvim/lua/key/Update.lua +++ /dev/null @@ -1,5 +0,0 @@ --- Update all command. -vim.api.nvim_create_user_command("Update", function (args) - vim.cmd("PackerUpdate") - vim.cmd("TSUpdate") -end, { desc = "Update everything." }) diff --git a/.config/nvim/lua/key/Whichkey.lua b/.config/nvim/lua/key/Whichkey.lua deleted file mode 100644 index d4edb6d..0000000 --- a/.config/nvim/lua/key/Whichkey.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("key/Rekey") - --- Show keymap help. -rekey_normal("?", "WhichKey") diff --git a/.config/nvim/lua/plugin/Align.lua b/.config/nvim/lua/plugin/Align.lua deleted file mode 100644 index 7db2b57..0000000 --- a/.config/nvim/lua/plugin/Align.lua +++ /dev/null @@ -1,7 +0,0 @@ -require("mini.align").setup { - mappings = { - start = "a", - -- start_with_preview = 'A', - }, -} - diff --git a/.config/nvim/lua/plugin/Autoclose.lua b/.config/nvim/lua/plugin/Autoclose.lua deleted file mode 100644 index e932054..0000000 --- a/.config/nvim/lua/plugin/Autoclose.lua +++ /dev/null @@ -1,13 +0,0 @@ -require("autoclose").setup({ - keys = { - ["'"] = { escape = false, close = false, pair = "''", disabled_filetypes = {} }, - ["("] = { escape = true, close = true, pair = "()", disabled_filetypes = {} }, - ["<"] = { escape = true, close = true, pair = "<>", disabled_filetypes = {} }, - ["\""] = { escape = true, close = true, pair = "\"\"", disabled_filetypes = {} }, - ["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {} }, - ["{"] = { escape = true, close = true, pair = "{}", disabled_filetypes = {} }, - }, - -- options = { - -- disabled_filetypes = { "text", "markdown" }, - -- } -}) diff --git a/.config/nvim/lua/plugin/Bufferline.lua b/.config/nvim/lua/plugin/Bufferline.lua deleted file mode 100644 index da65645..0000000 --- a/.config/nvim/lua/plugin/Bufferline.lua +++ /dev/null @@ -1 +0,0 @@ -require("bufferline").setup() diff --git a/.config/nvim/lua/plugin/Closebuffers.lua b/.config/nvim/lua/plugin/Closebuffers.lua deleted file mode 100644 index a1f2906..0000000 --- a/.config/nvim/lua/plugin/Closebuffers.lua +++ /dev/null @@ -1,7 +0,0 @@ -require("close_buffers").setup({ - file_glob_ignore = {}, - file_regex_ignore = {}, - filetype_ignore = {}, - next_buffer_cmd = nil, - preserve_window_layout = { "this", "nameless" }, -}) diff --git a/.config/nvim/lua/plugin/Filetree.lua b/.config/nvim/lua/plugin/Filetree.lua deleted file mode 100644 index 8d61b72..0000000 --- a/.config/nvim/lua/plugin/Filetree.lua +++ /dev/null @@ -1,36 +0,0 @@ --- Disable netrw at the very start of your init.lua. -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 - -local function my_on_attach(bufnr) - local api = require "nvim-tree.api" - - local function opts(desc) - return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } - end - - -- Default mappings. - api.config.mappings.default_on_attach(bufnr) - - -- Custom mappings. - vim.keymap.set('n', '', api.tree.change_root_to_node, opts('Cd into')) -end - --- Set termguicolors to enable highlight groups. -vim.opt.termguicolors = true - --- Setup nvim-tree. -require("nvim-tree").setup({ - on_attach = my_on_attach, - sort_by = "case_sensitive", - view = { - width = 30, - }, - renderer = { - group_empty = true, - }, - filters = { - dotfiles = false, - git_ignored = false - }, -}) diff --git a/.config/nvim/lua/plugin/Fold.lua b/.config/nvim/lua/plugin/Fold.lua deleted file mode 100644 index b088a28..0000000 --- a/.config/nvim/lua/plugin/Fold.lua +++ /dev/null @@ -1,3 +0,0 @@ -vim.opt.foldexpr = "nvim_treesitter#foldexpr()" -vim.opt.foldlevel = 99 -vim.opt.foldmethod = "expr" diff --git a/.config/nvim/lua/plugin/Gitsigns.lua b/.config/nvim/lua/plugin/Gitsigns.lua deleted file mode 100644 index c26b670..0000000 --- a/.config/nvim/lua/plugin/Gitsigns.lua +++ /dev/null @@ -1,43 +0,0 @@ -require("gitsigns").setup { - signs = { - add = { text = "│" }, - change = { text = "│" }, - changedelete = { text = "~" }, - delete = { text = "_" }, - topdelete = { text = "‾" }, - untracked = { text = "┆" }, - }, - linehl = false, - numhl = true, - signcolumn = false, - word_diff = false, - watch_gitdir = { - follow_files = true, - }, - attach_to_untracked = true, - current_line_blame = false, - current_line_blame_opts = { - delay = 1000, - ignore_whitespace = false, - virt_text = true, - virt_text_pos = "eol", - }, - current_line_blame_formatter = ", - ", - max_file_length = 40000, - sign_priority = 6, - status_formatter = nil, - update_debounce = 100, - preview_config = { - border = "single", - col = 1, - relative = "cursor", - row = 0, - style = "minimal", - }, - yadm = { - enable = false, - }, -} - --- Set custom color. -vim.cmd("highlight gitsignscurrentlineblame guibg=#00000000 guifg=#aaaaaa") diff --git a/.config/nvim/lua/plugin/Gruvbox.lua b/.config/nvim/lua/plugin/Gruvbox.lua deleted file mode 100644 index 50c976d..0000000 --- a/.config/nvim/lua/plugin/Gruvbox.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd("colorscheme gruvbox-material") diff --git a/.config/nvim/lua/plugin/Indent.lua b/.config/nvim/lua/plugin/Indent.lua deleted file mode 100644 index 279f4f7..0000000 --- a/.config/nvim/lua/plugin/Indent.lua +++ /dev/null @@ -1,6 +0,0 @@ --- Auto-detect indentation type. -require("indent-o-matic").setup { - max_lines = 1024, - skip_multiline = true, - standard_widths = { 2, 4, 8 }, -} diff --git a/.config/nvim/lua/plugin/Init.lua b/.config/nvim/lua/plugin/Init.lua deleted file mode 100644 index 84d0e62..0000000 --- a/.config/nvim/lua/plugin/Init.lua +++ /dev/null @@ -1,75 +0,0 @@ -local ensure_packer = function() - local fn = vim.fn - local install_path = fn.stdpath("data").."/site/pack/packer/start/packer.nvim" - if fn.empty(fn.glob(install_path)) > 0 then - fn.system({"git", "clone", "--depth", "1", "https://git.voronind.com/mirror/packer.nvim.git", install_path}) - vim.cmd [[packadd packer.nvim]] - return true - end - return false -end - -local packer_bootstrap = ensure_packer() - -local available = function(commands) - for _, command in ipairs(commands) do - if vim.fn.executable(command) ~= 1 then - return false - end - end - return true -end - -return require("packer").startup(function(use) - use "https://git.voronind.com/mirror/SingleComment.nvim.git" - use "https://git.voronind.com/mirror/autoclose.nvim.git" - use "https://git.voronind.com/mirror/bufferline.nvim.git" - use "https://git.voronind.com/mirror/close-buffers.nvim.git" - use "https://git.voronind.com/mirror/gitsigns.nvim.git" - use "https://git.voronind.com/mirror/gruvbox-material.git" - use "https://git.voronind.com/mirror/indent-o-matic.git" - use "https://git.voronind.com/mirror/lualine.nvim.git" - use "https://git.voronind.com/mirror/mini.align.git" - use "https://git.voronind.com/mirror/nvim-lspconfig.git" - use "https://git.voronind.com/mirror/nvim-tree.lua.git" - use "https://git.voronind.com/mirror/nvim-treesitter.git" - use "https://git.voronind.com/mirror/nvim-web-devicons.git" - use "https://git.voronind.com/mirror/packer.nvim.git" - use "https://git.voronind.com/mirror/plenary.nvim.git" - use "https://git.voronind.com/mirror/telescope.nvim.git" - use "https://git.voronind.com/mirror/todo-comments.nvim.git" - use "https://git.voronind.com/mirror/tokyonight.nvim.git" - use "https://git.voronind.com/mirror/trouble.nvim.git" - use "https://git.voronind.com/mirror/which-key.nvim.git" - - -- Plugin toggles. - local treesitter = true - - -- Plugin setup. Order is important. - require("plugin/Filetree") - require("plugin/lsp/Init") - require("plugin/Bufferline") - require("plugin/Lualine") - require("plugin/Autoclose") - require("plugin/Gitsigns") - require("plugin/Trouble") - require("plugin/Tokyonight") - require("plugin/Gruvbox") - require("plugin/Closebuffers") - require("plugin/Telescope") - require("plugin/Todo") - require("plugin/Indent") - require("plugin/Align") - - if available({"g++"}) then - if treesitter then - require("plugin/Treesitter") - require("plugin/Fold") - end - end - - -- Auto-install. - if packer_bootstrap then - require("packer").sync() - end -end) diff --git a/.config/nvim/lua/plugin/Lualine.lua b/.config/nvim/lua/plugin/Lualine.lua deleted file mode 100644 index 3029c4b..0000000 --- a/.config/nvim/lua/plugin/Lualine.lua +++ /dev/null @@ -1,40 +0,0 @@ -require("lualine").setup { - options = { - -- theme = "ayu_mirage", - icons_enabled = true, - component_separators = { left = "", right = ""}, - section_separators = { left = "", right = ""}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - always_divide_middle = true, - globalstatus = false, - ignore_focus = {}, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = {"mode"}, - lualine_b = {"branch", "diff", "diagnostics"}, - lualine_c = {"filename"}, - lualine_x = {"encoding", "fileformat", "filetype"}, - lualine_y = {"progress"}, - lualine_z = {"location"}, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {"filename"}, - lualine_x = {"location"}, - lualine_y = {}, - lualine_z = {}, - }, - extensions = {}, - inactive_winbar = {}, - tabline = {}, - winbar = {}, -} diff --git a/.config/nvim/lua/plugin/Telescope.lua b/.config/nvim/lua/plugin/Telescope.lua deleted file mode 100644 index d30fb98..0000000 --- a/.config/nvim/lua/plugin/Telescope.lua +++ /dev/null @@ -1,11 +0,0 @@ -require("telescope").setup{ - defaults = { - mappings = { - i = { - [""] = "which_key", - } - } - }, - extensions = { }, - pickers = { }, -} diff --git a/.config/nvim/lua/plugin/Todo.lua b/.config/nvim/lua/plugin/Todo.lua deleted file mode 100644 index e583a45..0000000 --- a/.config/nvim/lua/plugin/Todo.lua +++ /dev/null @@ -1,53 +0,0 @@ -require("todo-comments").setup { - sign_priority = 8, - signs = false, - keywords = { - FIX = { - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, - color = "error", - icon = " ", - }, - HACK = { icon = " ", color = "warning" }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, - TODO = { icon = " ", color = "info" }, - WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - }, - gui_style = { - bg = "BOLD", - fg = "NONE", - }, - merge_keywords = true, - highlight = { - after = "fg", - before = "", - comments_only = true, - exclude = {}, - keyword = "wide", - max_line_len = 400, - multiline = true, - multiline_context = 10, - multiline_pattern = "^.", - pattern = [[.*<(KEYWORDS)\s*:]], - }, - colors = { - default = { "Identifier", "#7C3AED" }, - error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, - hint = { "DiagnosticHint", "#10B981" }, - info = { "DiagnosticInfo", "#2563EB" }, - test = { "Identifier", "#FF00FF" }, - warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, - }, - search = { - command = "rg", - args = { - "--color=never", - "--no-heading", - "--with-filename", - "--line-number", - "--column", - }, - pattern = [[\b(KEYWORDS):]], - }, -} diff --git a/.config/nvim/lua/plugin/Tokyonight.lua b/.config/nvim/lua/plugin/Tokyonight.lua deleted file mode 100644 index 667ee34..0000000 --- a/.config/nvim/lua/plugin/Tokyonight.lua +++ /dev/null @@ -1,23 +0,0 @@ -require("tokyonight").setup({ - light_style = "night", - style = "night", - terminal_colors = true, - transparent = false, - styles = { - comments = { italic = true }, - floats = "dark", - functions = {}, - keywords = { italic = true }, - sidebars = "dark", - variables = {}, - }, - day_brightness = 0.3, - dim_inactive = false, - hide_inactive_statusline = false, - lualine_bold = false, - on_colors = function(colors) end, - on_highlights = function(highlights, colors) end, - sidebars = { "qf", "help" }, -}) - --- vim.cmd[[colorscheme tokyonight]] diff --git a/.config/nvim/lua/plugin/Treesitter.lua b/.config/nvim/lua/plugin/Treesitter.lua deleted file mode 100644 index ecf3eca..0000000 --- a/.config/nvim/lua/plugin/Treesitter.lua +++ /dev/null @@ -1,19 +0,0 @@ -require("nvim-treesitter.configs").setup { - auto_install = true, - -- ensure_installed = "all", - sync_install = false, - highlight = { - additional_vim_regex_highlighting = false, - enable = true, - use_languagetree = true, - }, - indent = { - enable = true, - }, - autotag = { - enable = true - }, - rainbow = { - enable = true - }, -} diff --git a/.config/nvim/lua/plugin/Trouble.lua b/.config/nvim/lua/plugin/Trouble.lua deleted file mode 100644 index 38ef1e9..0000000 --- a/.config/nvim/lua/plugin/Trouble.lua +++ /dev/null @@ -1 +0,0 @@ -require("trouble").setup() diff --git a/.config/nvim/lua/plugin/lsp/Init.lua b/.config/nvim/lua/plugin/lsp/Init.lua deleted file mode 100644 index 31435f3..0000000 --- a/.config/nvim/lua/plugin/lsp/Init.lua +++ /dev/null @@ -1,4 +0,0 @@ --- require("plugin/lsp/Kotlin") --- require("plugin/lsp/Python") -require("plugin/lsp/Rust") -require("plugin/lsp/Tex") diff --git a/.config/nvim/lua/plugin/lsp/Kotlin.lua b/.config/nvim/lua/plugin/lsp/Kotlin.lua deleted file mode 100644 index e960df6..0000000 --- a/.config/nvim/lua/plugin/lsp/Kotlin.lua +++ /dev/null @@ -1,3 +0,0 @@ -local lspconfig = require("lspconfig") - -lspconfig.kotlin_language_server.setup {} diff --git a/.config/nvim/lua/plugin/lsp/Python.lua b/.config/nvim/lua/plugin/lsp/Python.lua deleted file mode 100644 index 5642869..0000000 --- a/.config/nvim/lua/plugin/lsp/Python.lua +++ /dev/null @@ -1,3 +0,0 @@ -local lspconfig = require("lspconfig") - -lspconfig.pyright.setup {} diff --git a/.config/nvim/lua/plugin/lsp/Rust.lua b/.config/nvim/lua/plugin/lsp/Rust.lua deleted file mode 100644 index 2ca5362..0000000 --- a/.config/nvim/lua/plugin/lsp/Rust.lua +++ /dev/null @@ -1,16 +0,0 @@ -local lspconfig = require("lspconfig") - -lspconfig.rust_analyzer.setup { - settings = { - ["rust-analyzer"] = { - rustfmt = { - extraArgs = { - "--config", - "hard_tabs=true", - } - } - }, - }, -} - -vim.g.rust_recommended_style = false diff --git a/.config/nvim/lua/plugin/lsp/Tex.lua b/.config/nvim/lua/plugin/lsp/Tex.lua deleted file mode 100644 index bc0fb7a..0000000 --- a/.config/nvim/lua/plugin/lsp/Tex.lua +++ /dev/null @@ -1,60 +0,0 @@ -local lspconfig = require('lspconfig') -local config = { - filetypes = { - "bib", - "gitcommit", - "markdown", - "org", - "pandoc", - "plaintex", - "rnoweb", - "rst", - "tex", - "text", - }, - settings = { - ["ltex"] = { - language = "auto" - } - } -} - -lspconfig.ltex.setup(config) - --- Use TeX LSP for spellcheck. -vim.api.nvim_create_user_command("SCOn", function (args) - lspconfig.ltex.setup(config) -end, { desc = "Enable spellcheck." }) - -vim.api.nvim_create_user_command("SCOff", function (args) - lspconfig.ltex.setup { filetypes = {} } -end, { desc = "Disable spellcheck." }) - -vim.api.nvim_create_user_command("SCLangRU", function (args) - config.settings['ltex'].language = "ru-RU" - lspconfig.ltex.setup(config) -end, { desc = "Set spellcheck to Russian." }) - -vim.api.nvim_create_user_command("SCLangEN", function (args) - config.settings['ltex'].language = "en-US" - lspconfig.ltex.setup(config) -end, { desc = "Set spellcheck to English." }) - -vim.api.nvim_create_user_command("SCLangAuto", function (args) - config.settings['ltex'].language = "auto" - lspconfig.ltex.setup(config) -end, { desc = "Set spellcheck to Auto." }) - -vim.api.nvim_create_user_command("SCForce", function (args) - vim.cmd("setfiletype text") - vim.cmd("SCOn") -end, { desc = "Set buffer type to text." }) - -vim.api.nvim_create_user_command("SCReset", function (args) - vim.cmd("filetype detect") - vim.cmd("SCLangAuto") -end, { desc = "Set buffer type to auto." }) - -vim.api.nvim_create_user_command("SCInfo", function (args) - vim.cmd("LspInfo") -end, { desc = "Show info about spellcheck." }) diff --git a/.gitignore b/.gitignore index 41d32c0..90f03ae 100644 --- a/.gitignore +++ b/.gitignore @@ -97,11 +97,6 @@ # User dirs. !/.config/user-dirs.dirs -# Nvim. -!/.config/nvim/ -!/.config/nvim/** -/.config/nvim/plugin/ - # Ssh. !/.ssh/ /.ssh/**