Manager - Plugin for micro editor
The plugin manager provides a way to manage linters, formatters, commands, keybindings, settings, plugins.
Installationπ
Settingsπ
Add this repo as a pluginrepos option in the $XDG_CONFIG_HOME/micro/settings.json
file (it is necessary to restart the micro after this change):
~/.config/micro/settings.json
"pluginrepos": [
"https://codeberg.org/micro-plugins/manager/raw/branch/main/repo.json"
]
Installπ
Install
Dashboardπ
Inspired by telescope.nvim, project.nvim, alpha-nvim and the lunarvim dashboard we have a dash to manage your projects and files.
Open the dashboard with the command > manager dash
or with the default bind Alt-Ctrl-o
.
For more details see the dashboard documentation.
Info Bufferπ
A buffer with the configuration status can be viewed with the manager info
command
or with the default bind Alt-Ctrl-q
.
Use arrows to navigate statuses.
A complete exampleπ
~/.config/micro/init.lua
MANAGER_ENABLED = true
linters = { -- (1)!
{
cmd = 'tsc --noEmit --pretty false %f',
errorformat = '%f%(%l,%c%): %m',
filetypes = { 'typescript' },
},
}
formatters = { -- (2)!
{
cmd = 'isort -l 79 --trailing-comma --multi-line 3 %f',
name = 'isort',
bind = 'Alt-g',
filetypes = { 'python' },
},
}
bindings = { -- (3)!
{ key = 'Alt-m', cmd = 'JumpToMatchingBrace', overwrite = true },
}
settings = { -- (4)!
['ft:json'] = { commenttype = '// %s' },
colorscheme = 'one-dark',
pluginrepos = { 'https://codeberg.org/micro-plugins/manager/raw/branch/main/repo.json' },
tabstospaces = true,
}
plugins = { -- (5)!
{
'lsp',
git = { 'https://github.com/AndCake/micro-plugin-lsp.git', branch = 'main' },
config = {
['lsp.formatOnSave'] = false,
},
bindings = {
{ key = 'CtrlSpace', cmd = 'command:lspcompletion', overwrite = true },
},
},
}
commands = { -- (6)!
{
-- Open a new Vsplit (on the very left)
name = { 'vsp', 'vsplitleft' },
action = function(bp)
local micro = import('micro')
local buffer = import('micro/buffer')
bp:VSplitIndex(buffer.NewBuffer('', ''), false) -- right=false
micro.InfoBar():Message('New open file')
end,
bindings = {
{ key = 'Alt-|', cmd = 'command:vsp', overwrite = true },
},
complete = config.NoComplete,
},
}
- For more details see the linters documentation.
- For more details see the formatter documentation.
- For more details see the binding documentation.
- For more details see the settings documentation.
- For more details see the plugin documentation.
- For more details see the command documentation.