nvim: Add Mini for indentblankline and commentary

Replaced indentblankline and vim-commentary both with mini.nvim, which
has both as submodules.

Commentary is replaced exactly and without any end-user changes, simply
transferred to be included in the lua plugin instead.
Indent blankline is a bit simpler but brings with it a new text object
which can be interacted with through `ai` and `ii`, e.g. `vii` select in
current indentation or `dai` delete around current indentation - very
useful.

Also added fuzzy matching algorithm from mini.nvim to telescope as
default sorter.
This commit is contained in:
Marty Oehme 2022-04-11 13:00:55 +02:00
parent 72c0a5d5f2
commit 8aa02654eb
Signed by: Marty
GPG key ID: B7538B8F50A1C800
4 changed files with 9 additions and 24 deletions

View file

@ -1,18 +0,0 @@
-- Settings for indentBlankline
-- turn off for diff views since we want to compare directly
if vim.wo.diff then vim.g["indent_blankline_enabled"] = false end
vim.g.indent_blankline_char = ""
vim.g.indent_blankline_filetype_exclude = {
"help", "undotree", "markdown", "text", "pandoc", "rst", "asciidoc",
"vim-plug"
}
vim.g.indent_blankline_buftype_exclude = {"terminal"}
vim.g.indent_blankline_use_treesitter = true
vim.g.indent_blankline_show_first_indent_level = false
vim.g.indent_blankline_show_current_context = true
vim.g.indent_blankline_context_highlight = "Function"
vim.g.indent_blankline_context_patterns = {"function", "class", "method"}

View file

@ -0,0 +1,2 @@
require('mini.comment').setup()
require('mini.indentscope').setup({symbol = ""})

View file

@ -9,7 +9,8 @@ require("telescope").setup {
vimgrep_arguments = {
'rg', '--ignore-vcs', '--hidden', '--color=never', '--no-heading',
'--with-filename', '--line-number', '--column', '--smart-case'
}
},
generic_sorter = require('mini.fuzzy').get_telescope_sorter
},
pickers = {
buffers = {theme = "ivy"},

View file

@ -27,10 +27,6 @@ require("packer").startup(function()
use 'RRethy/vim-illuminate' -- highlight other occurences of the word under cursor
use 'ojroques/vim-oscyank' -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
use 'ggandor/lightspeed.nvim' -- jump between letters with improved fFtT quicksearch, mimics sneak
-- use { -- weird errors currently
-- 'lukas-reineke/indent-blankline.nvim', -- show a vertical line for each indentation
-- config = function() require('plug._indent-blankline') end
-- }
-- files
use 'vifm/vifm.vim' -- integrate file manager
use {
@ -56,7 +52,6 @@ require("packer").startup(function()
}
-- editing
use {'tpope/vim-commentary', event = "BufRead"} -- easily toggle comments for lines, paragraphs etc with gc
use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr
use {
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
@ -144,6 +139,11 @@ require("packer").startup(function()
--
-- nvim plugs
use {
'echasnovski/mini.nvim',
branch = 'stable',
config = function() require('plug._mini') end
}
use 'Iron-E/nvim-cartographer' -- makes it easier to set mappings through lua
use 'marty-oehme/zettelkasten.nvim' -- simple static markdown linking
use {