New mini.nvim plugins and cleanup
This commit is contained in:
		@@ -1,23 +1,12 @@
 | 
			
		||||
-- Close brackets
 | 
			
		||||
local config = {
 | 
			
		||||
   keys = {
 | 
			
		||||
      ["("] = { escape = false, close = true, pair = "()", disabled_filetypes = {} },
 | 
			
		||||
      ["["] = { escape = false, close = true, pair = "[]", disabled_filetypes = {} },
 | 
			
		||||
      ["{"] = { escape = false, close = true, pair = "{}", disabled_filetypes = {} },
 | 
			
		||||
local autoclose = require("autoclose")
 | 
			
		||||
 | 
			
		||||
      [">"] = { escape = true, close = false, pair = "<>", disabled_filetypes = {} },
 | 
			
		||||
      [")"] = { escape = true, close = false, pair = "()", disabled_filetypes = {} },
 | 
			
		||||
      ["]"] = { escape = true, close = false, pair = "[]", disabled_filetypes = {} },
 | 
			
		||||
      ["}"] = { escape = true, 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 = {} },
 | 
			
		||||
   },
 | 
			
		||||
autoclose.setup({
 | 
			
		||||
    options = {
 | 
			
		||||
      disabled_filetypes = { "text", "markdown", "norg" },
 | 
			
		||||
      disable_when_touch = false,
 | 
			
		||||
      pair_spaces = false,
 | 
			
		||||
        disabled_filetypes = { "text", "markdown", "neogit", },
 | 
			
		||||
        disable_when_touch = true,
 | 
			
		||||
        pair_spaces = true,
 | 
			
		||||
        auto_indent = true,
 | 
			
		||||
        disable_command_mode = true,
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ require("barbecue").setup({
 | 
			
		||||
    ---modified.
 | 
			
		||||
    ---
 | 
			
		||||
    ---@type boolean
 | 
			
		||||
    show_modified = false,
 | 
			
		||||
    show_modified = true,
 | 
			
		||||
 | 
			
		||||
    ---Get modified status of file.
 | 
			
		||||
    ---
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
local lsp_zero = require('lsp-zero')
 | 
			
		||||
local lsp_zero = require("lsp-zero")
 | 
			
		||||
 | 
			
		||||
lsp_zero.on_attach(function(client, bufnr)
 | 
			
		||||
    -- see :help lsp-zero-keybindings
 | 
			
		||||
@@ -6,8 +6,8 @@ lsp_zero.on_attach(function(client, bufnr)
 | 
			
		||||
    lsp_zero.default_keymaps({buffer = bufnr})
 | 
			
		||||
end)
 | 
			
		||||
 | 
			
		||||
require('mason').setup({})
 | 
			
		||||
require('mason-lspconfig').setup({
 | 
			
		||||
require("mason").setup({})
 | 
			
		||||
require("mason-lspconfig").setup({
 | 
			
		||||
    ensure_installed = {},
 | 
			
		||||
    handlers = {
 | 
			
		||||
        lsp_zero.default_setup,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										54
									
								
								after/plugin/mini.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								after/plugin/mini.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
-- Configuration of mini.nvim plugins
 | 
			
		||||
 | 
			
		||||
-- mini.map
 | 
			
		||||
 | 
			
		||||
local map = require("mini.map")
 | 
			
		||||
map.setup({
 | 
			
		||||
    symbols = {
 | 
			
		||||
        encode = map.gen_encode_symbols.dot("3x2")
 | 
			
		||||
    },
 | 
			
		||||
    window = {
 | 
			
		||||
        width = 16,
 | 
			
		||||
        show_integration_count = false
 | 
			
		||||
    },
 | 
			
		||||
    integrations = {
 | 
			
		||||
        map.gen_integration.diagnostic({
 | 
			
		||||
            error = "DiagnosticFloatingError",
 | 
			
		||||
            warn = "DiagnosticFloatingWarn",
 | 
			
		||||
            info = "DiagnosticFloatingInfo",
 | 
			
		||||
            hint = "DiagnosticFloatingHint",
 | 
			
		||||
        }),
 | 
			
		||||
        map.gen_integration.builtin_search(),
 | 
			
		||||
    },
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
local animate = require("mini.animate")
 | 
			
		||||
animate.setup({
 | 
			
		||||
    cursor = {
 | 
			
		||||
        timing = animate.gen_timing.linear({ duration = 150, unit = "total" })
 | 
			
		||||
    },
 | 
			
		||||
    scroll = {
 | 
			
		||||
        timing = animate.gen_timing.linear({ duration = 150, unit = "total" })
 | 
			
		||||
    },
 | 
			
		||||
    resize = {
 | 
			
		||||
        timing = animate.gen_timing.linear({ duration = 150, unit = "total" })
 | 
			
		||||
    },
 | 
			
		||||
    open = {
 | 
			
		||||
        timing = animate.gen_timing.linear({ duration = 150, unit = "total" })
 | 
			
		||||
    },
 | 
			
		||||
    close = {
 | 
			
		||||
        timing = animate.gen_timing.linear({ duration = 150, unit = "total" })
 | 
			
		||||
    },
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
vim.keymap.set("n", "<Leader>mc", map.close)
 | 
			
		||||
vim.keymap.set("n", "<Leader>mf", map.toggle_focus)
 | 
			
		||||
vim.keymap.set("n", "<Leader>mo", map.open)
 | 
			
		||||
vim.keymap.set("n", "<Leader>mr", map.refresh)
 | 
			
		||||
vim.keymap.set("n", "<Leader>ms", map.toggle_side)
 | 
			
		||||
vim.keymap.set("n", "<Leader>mt", map.toggle)
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
require('oil').setup({
 | 
			
		||||
require("oil").setup({
 | 
			
		||||
    default_file_explorer = false,
 | 
			
		||||
 | 
			
		||||
    columns = {
 | 
			
		||||
@@ -10,8 +10,8 @@ require('oil').setup({
 | 
			
		||||
 | 
			
		||||
    float = {
 | 
			
		||||
        -- Padding around the floating window
 | 
			
		||||
        padding = 8,
 | 
			
		||||
        max_width = 80,
 | 
			
		||||
        padding = 12,
 | 
			
		||||
        max_width = 120,
 | 
			
		||||
        max_height = 64,
 | 
			
		||||
        border = "rounded",
 | 
			
		||||
        win_options = {
 | 
			
		||||
@@ -22,23 +22,7 @@ require('oil').setup({
 | 
			
		||||
        override = function(conf)
 | 
			
		||||
            return conf
 | 
			
		||||
        end,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    keymaps = {
 | 
			
		||||
        ["g?"] = "actions.show_help",
 | 
			
		||||
        ["<CR>"] = "actions.select",
 | 
			
		||||
        ["<C-s>"] = "actions.select_vsplit",
 | 
			
		||||
        ["<C-h>"] = "actions.select_split",
 | 
			
		||||
        ["<C-t>"] = "actions.select_tab",
 | 
			
		||||
        ["<C-p>"] = "actions.preview",
 | 
			
		||||
        ["<Esc>"] = "actions.close",
 | 
			
		||||
        ["<C-r>"] = "actions.refresh",
 | 
			
		||||
        ["-"] = "actions.parent",
 | 
			
		||||
        ["_"] = "actions.open_cwd",
 | 
			
		||||
        ["`"] = "actions.cd",
 | 
			
		||||
        ["~"] = "actions.tcd",
 | 
			
		||||
        ["g."] = "actions.toggle_hidden",
 | 
			
		||||
    },
 | 
			
		||||
    }
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
vim.keymap.set('n', '<leader>-', ":Oil --float <CR>")
 | 
			
		||||
vim.keymap.set("n", "<leader>-", ":Oil --float <CR>")
 | 
			
		||||
 
 | 
			
		||||
@@ -3,11 +3,11 @@ require("auto-session").setup {
 | 
			
		||||
    auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/"},
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
require('session-lens').setup({
 | 
			
		||||
    path_display = {'shorten'},
 | 
			
		||||
require("session-lens").setup({
 | 
			
		||||
    path_display = {"shorten"},
 | 
			
		||||
    theme_conf = { border = true },
 | 
			
		||||
    previewer = false,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
vim.keymap.set('n', '<leader>ss', ":SearchSession<CR>")
 | 
			
		||||
vim.keymap.set("n", "<leader>ss", ":SearchSession<CR>")
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
-- finding files in working dir and repo
 | 
			
		||||
local builtin = require('telescope.builtin')
 | 
			
		||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
 | 
			
		||||
vim.keymap.set('n', '<leader>pf', builtin.git_files, {})
 | 
			
		||||
vim.keymap.set('n', '<leader>ps', function()
 | 
			
		||||
local builtin = require("telescope.builtin")
 | 
			
		||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
 | 
			
		||||
vim.keymap.set("n", "<leader>pf", builtin.git_files, {})
 | 
			
		||||
vim.keymap.set("n", "<leader>ps", function()
 | 
			
		||||
	builtin.grep_string({ search = vim.fn.input("Grep > ") });
 | 
			
		||||
end)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,15 +1,26 @@
 | 
			
		||||
-- parsing and highlighting
 | 
			
		||||
require'nvim-treesitter.configs'.setup {
 | 
			
		||||
require"nvim-treesitter.configs".setup {
 | 
			
		||||
    -- A list of parser names, or "all" (the five listed parsers should always be installed)
 | 
			
		||||
 | 
			
		||||
  ensure_installed = 'all',
 | 
			
		||||
    ensure_installed = "all",
 | 
			
		||||
    -- Install parsers synchronously (only applied to `ensure_installed`)
 | 
			
		||||
    sync_install = false,
 | 
			
		||||
 | 
			
		||||
    -- Automatically install missing parsers when entering buffer
 | 
			
		||||
  -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
 | 
			
		||||
    -- Recommendation: set to false if you don"t have `tree-sitter` CLI installed locally
 | 
			
		||||
    auto_install = true,
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    incremental_selection = {
 | 
			
		||||
        enable = true,
 | 
			
		||||
        keymaps = {
 | 
			
		||||
            init_selection = "gnn",
 | 
			
		||||
            node_incremental = "grn",
 | 
			
		||||
            scope_incremental = "grc",
 | 
			
		||||
            node_decremental = "grm",
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    highlight = {
 | 
			
		||||
        enable = true,
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,9 @@ return {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    -- useful
 | 
			
		||||
 | 
			
		||||
    { dir = "/mnt/nas_belar/code/vim-plugins/narrator.nvim" },
 | 
			
		||||
 | 
			
		||||
    { "rmagatti/session-lens",
 | 
			
		||||
        dependencies = {
 | 
			
		||||
            "rmagatti/auto-session",
 | 
			
		||||
@@ -48,20 +51,9 @@ return {
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "numToStr/Comment.nvim",
 | 
			
		||||
        lazy = false,
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("Comment").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "mbbill/undotree" },
 | 
			
		||||
 | 
			
		||||
    { "m4xshen/autoclose.nvim",
 | 
			
		||||
        config = function ()
 | 
			
		||||
            require("autoclose").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
    { "m4xshen/autoclose.nvim" },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    -- pretty
 | 
			
		||||
@@ -94,23 +86,78 @@ return {
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    -- mini
 | 
			
		||||
 | 
			
		||||
    { "echasnovski/mini.basics",
 | 
			
		||||
        version = false,
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("mini.basics").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "echasnovski/mini.ai",
 | 
			
		||||
        version = false,
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("mini.ai").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "echasnovski/mini.comment",
 | 
			
		||||
        version = false,
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("mini.comment").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "echasnovski/mini.map",
 | 
			
		||||
        version = false,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "echasnovski/mini.statusline",
 | 
			
		||||
        version = false,
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("mini.statusline").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "echasnovski/mini.animate",
 | 
			
		||||
        version = false,
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("mini.animate").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "echasnovski/mini.fuzzy",
 | 
			
		||||
        version = false,
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("mini.fuzzy").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    { "echasnovski/mini.splitjoin",
 | 
			
		||||
        version = false,
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("mini.splitjoin").setup()
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    -- lsp
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
        "Exafunction/codeium.vim",
 | 
			
		||||
    { "Exafunction/codeium.vim",
 | 
			
		||||
        event = "BufEnter"
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    {"williamboman/mason.nvim",
 | 
			
		||||
    { "williamboman/mason.nvim",
 | 
			
		||||
        config = function()
 | 
			
		||||
            require("mason").setup({})
 | 
			
		||||
        end
 | 
			
		||||
    },
 | 
			
		||||
    {"williamboman/mason-lspconfig.nvim"},
 | 
			
		||||
    { "williamboman/mason-lspconfig.nvim" },
 | 
			
		||||
 | 
			
		||||
    {"VonHeikemen/lsp-zero.nvim", branch = "v3.x"},
 | 
			
		||||
    {"neovim/nvim-lspconfig"},
 | 
			
		||||
    {"hrsh7th/cmp-nvim-lsp"},
 | 
			
		||||
    {"hrsh7th/nvim-cmp"},
 | 
			
		||||
    {"L3MON4D3/LuaSnip"},
 | 
			
		||||
    { "VonHeikemen/lsp-zero.nvim", branch = "v3.x" },
 | 
			
		||||
    { "neovim/nvim-lspconfig" },
 | 
			
		||||
    { "hrsh7th/cmp-nvim-lsp" },
 | 
			
		||||
    { "hrsh7th/nvim-cmp" },
 | 
			
		||||
    { "L3MON4D3/LuaSnip" },
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,6 @@ vim.keymap.set("n", "<leader>.", vim.cmd.Ex)
 | 
			
		||||
 | 
			
		||||
vim.keymap.set("n", "<C-b>", ":e #<CR>")
 | 
			
		||||
 | 
			
		||||
vim.keymap.set("n", "<C-b>w", ":wq<CR>")
 | 
			
		||||
 | 
			
		||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
 | 
			
		||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
 | 
			
		||||
 | 
			
		||||
@@ -22,3 +20,5 @@ vim.keymap.set("v", "<leader>y", "\"+y")
 | 
			
		||||
vim.keymap.set("n", "<leader>Y", "\"+Y")
 | 
			
		||||
 | 
			
		||||
vim.keymap.set("n", "<F5>", ":make")
 | 
			
		||||
 | 
			
		||||
vim.keymap.set("n", "<leader>l", ":noh<CR>")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user