refactor: switch to minimax

This commit is contained in:
Job
2026-06-01 21:02:04 +02:00
parent b1b6351bd8
commit d0bb6d84ba
18 changed files with 1558 additions and 300 deletions
+42
View File
@@ -0,0 +1,42 @@
-- ┌─────────────────────────┐
-- │ Filetype config example │
-- └─────────────────────────┘
--
-- This is an example of a configuration that will apply only to a particular
-- filetype, which is the same as file's basename ('markdown' in this example;
-- which is for '*.md' files).
--
-- It can contain any code which will be usually executed when the file is opened
-- (strictly speaking, on every 'filetype' option value change to target value).
-- Usually it needs to define buffer/window local options and variables.
-- So instead of `vim.o` to set options, use `vim.bo` for buffer-local options and
-- `vim.cmd('setlocal ...')` for window-local options (currently more robust).
--
-- This is also a good place to set buffer-local 'mini.nvim' variables.
-- See `:h mini.nvim-buffer-local-config` and `:h mini.nvim-disabling-recipes`.
-- Enable spelling and wrap for window
vim.cmd('setlocal spell wrap')
-- Fold with tree-sitter
vim.cmd('setlocal foldmethod=expr foldexpr=v:lua.vim.treesitter.foldexpr()')
-- Disable built-in `gO` mapping in favor of 'mini.basics'
vim.keymap.del('n', 'gO', { buffer = 0 })
-- Set markdown-specific surrounding in 'mini.surround'
vim.b.minisurround_config = {
custom_surroundings = {
-- Markdown link. Common usage:
-- `saiwL` + [type/paste link] + <CR> - add link
-- `sdL` - delete link
-- `srLL` + [type/paste link] + <CR> - replace link
L = {
input = { '%[().-()%]%(.-%)' },
output = function()
local link = require('mini.surround').user_input('Link: ')
return { left = '[', right = '](' .. link .. ')' }
end,
},
},
}
+35
View File
@@ -0,0 +1,35 @@
-- ┌────────────────────┐
-- │ LSP config example │
-- └────────────────────┘
--
-- This file contains configuration of 'lua_ls' language server.
-- Source: https://github.com/LuaLS/lua-language-server
--
-- It is used by `:h vim.lsp.enable()` and `:h vim.lsp.config()`.
-- See `:h vim.lsp.Config` and `:h vim.lsp.ClientConfig` for all available fields.
--
-- This config is designed for Lua's activity around Neovim. It provides only
-- basic config and can be further improved.
return {
on_attach = function(client, buf_id)
-- Reduce very long list of triggers for better 'mini.completion' experience
client.server_capabilities.completionProvider.triggerCharacters =
{ '.', ':', '#', '(' }
-- Use this function to define buffer-local mappings and behavior that depend
-- on attached client or only makes sense if there is language server attached.
end,
-- LuaLS Structure of these settings comes from LuaLS, not Neovim
settings = {
Lua = {
-- Define runtime properties. Use 'LuaJIT', as it is built into Neovim.
runtime = { version = 'LuaJIT', path = vim.split(package.path, ';') },
workspace = {
-- Don't analyze code from submodules
ignoreSubmodules = true,
-- Add Neovim's methods for easier code writing
library = { vim.env.VIMRUNTIME },
},
},
},
}
+4
View File
@@ -0,0 +1,4 @@
{
"local": { "prefix": "l", "body": "local $1 = $0" },
"Remove prefixes": { "prefix": ["lfu", "ll", "lpca"] }
}