Added mini pluligins and improved Mason.

This commit is contained in:
2026-06-27 19:52:00 +02:00
parent 60a602922e
commit 00290628f8
5 changed files with 76 additions and 0 deletions

View File

@@ -74,6 +74,20 @@ Leave terminal mode and return to normal mode:
## LSP ## LSP
Mason is installed through `vim.pack` together with `mason-lspconfig.nvim` and `nvim-lspconfig`.
This config automatically installs and enables the managed language servers on first start. The current managed set is `bashls`, `clangd`, `jsonls`, `lua_ls`, `marksman`, `taplo`, `ts_ls`, and `yamlls`.
Useful Mason commands:
```vim
:Mason
:MasonLog
:checkhealth mason
```
`ts_ls` provides TypeScript and JavaScript language server support after Mason installs `typescript-language-server`.
When an LSP server is attached to the current buffer: When an LSP server is attached to the current buffer:
- `gd` go to definition - `gd` go to definition

View File

@@ -1,4 +1,5 @@
require("romanzy.plugins.rose-pine") require("romanzy.plugins.rose-pine")
require("romanzy.plugins.mini")
require("romanzy.plugins.oil") require("romanzy.plugins.oil")
require("romanzy.plugins.telescope") require("romanzy.plugins.telescope")
require("romanzy.plugins.nvim-treesitter") require("romanzy.plugins.nvim-treesitter")

View File

@@ -104,5 +104,6 @@ end
require("mason").setup() require("mason").setup()
mason_lspconfig.setup({ mason_lspconfig.setup({
ensure_installed = managed_servers,
automatic_enable = managed_servers, automatic_enable = managed_servers,
}) })

View File

@@ -0,0 +1,56 @@
vim.pack.add({
{
src = "https://github.com/echasnovski/mini.nvim",
name = "mini.nvim",
branch = "stable",
},
})
local clue = require("mini.clue")
local icons = require("mini.icons")
local git = require("mini.git")
local diff = require("mini.diff")
local statusline = require("mini.statusline")
local hipatterns = require("mini.hipatterns")
local ai = require("mini.ai")
local notify = require("mini.notify")
local surround = require("mini.surround")
clue.setup({
triggers = {
{ mode = "n", keys = "<leader>" },
{ mode = "n", keys = "g" },
{ mode = "n", keys = "z" },
{ mode = "i", keys = "<C-x>" },
},
clues = {
clue.gen_clues.builtin_completion(),
clue.gen_clues.g(),
clue.gen_clues.marks(),
clue.gen_clues.registers(),
clue.gen_clues.windows(),
clue.gen_clues.z(),
},
window = {
delay = 500,
},
})
icons.setup({})
git.setup({})
diff.setup({})
statusline.setup({ use_icons = true })
hipatterns.setup({
highlighters = {
fixme = { pattern = "%f[%w]()FIXME()%f[%W]", group = "MiniHipatternsFixme" },
hack = { pattern = "%f[%w]()HACK()%f[%W]", group = "MiniHipatternsHack" },
todo = { pattern = "%f[%w]()TODO()%f[%W]", group = "MiniHipatternsTodo" },
note = { pattern = "%f[%w]()NOTE()%f[%W]", group = "MiniHipatternsNote" },
file = { pattern = "%f[%w]()FILE()%f[%W]", group = "MiniHipatternsNote" },
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
ai.setup({})
notify.setup({})
vim.notify = notify.make_notify()
surround.setup({})

View File

@@ -12,6 +12,10 @@
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d", "rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
"src": "https://github.com/mason-org/mason.nvim" "src": "https://github.com/mason-org/mason.nvim"
}, },
"mini.nvim": {
"rev": "1599a473aa6f5290a5d740b1144846e6f0c3963d",
"src": "https://github.com/echasnovski/mini.nvim"
},
"nvim-lspconfig": { "nvim-lspconfig": {
"rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e", "rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e",
"src": "https://github.com/neovim/nvim-lspconfig" "src": "https://github.com/neovim/nvim-lspconfig"