Skip to content

Logo

Manager - Plugin for micro editor

Lua Documentation Maintained GPLv3 license Issues Built with Material for MkDocs

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

Install with the micro CLI:

micro -plugin install manager

In your micro editor press Ctrl-e and run command:

plugin install manager


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.

dashboard

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.

infopane

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,
  },
}
  1. For more details see the linters documentation.
  2. For more details see the formatter documentation.
  3. For more details see the binding documentation.
  4. For more details see the settings documentation.
  5. For more details see the plugin documentation.
  6. For more details see the command documentation.