3561 Commits
Author SHA1 Message Date
DinoInteractive e207f97cdd Added csharp support for comment plugin (#4034) nightly 2026-10-07 19:36:58 +02:00
Jöran Karl 02164788bd Fix some oddities in InitPlugins() (#4249)
* plugins: Parse repo.json only, not every json file

According to the documentation, micro reads plugin info from the
`repo.json` file in the plugin's directory. In reality, micro reads
plugin info from each and every `*.json` file in the plugin's directory,
not only from `repo.json` (so if there are multiple json files, each
next one overrides info read from the previous one). Fix this absurdity.

* plugins: Don't parse repo.json for built-in plugins

Built-in plugins don't have repo.json and never will, there is no point
in checking if they have one, this only results in code duplication and
dead code.
2026-09-29 18:55:36 +02:00
Dmytro Maluka 290d8071be plugins: Don't parse repo.json for built-in plugins
Built-in plugins don't have repo.json and never will, there is no point
in checking if they have one, this only results in code duplication and
dead code.
2026-09-29 00:07:34 +02:00
Dmytro Maluka 227ebdfab6 plugins: Parse repo.json only, not every json file
According to the documentation, micro reads plugin info from the
`repo.json` file in the plugin's directory. In reality, micro reads
plugin info from each and every `*.json` file in the plugin's directory,
not only from `repo.json` (so if there are multiple json files, each
next one overrides info read from the previous one). Fix this absurdity.
2026-09-28 23:52:25 +02:00
Artem Lytkin 50a6fe59d3 config: Don't panic on plugin JSON files without a plugin entry (#4247)
A .json file in a plugin directory that decodes to an empty list (`[]`
or `null`) made NewPluginInfo index info[0] on an empty slice. The panic
happens in InitPlugins(), before the recover() in main(), and the
deferred exit(0) ends micro silently with status 0 on every start.

A file whose first entry has no Name did not crash, but it replaced the
plugin name with an empty string, so the plugin was dropped as "not a
plugin".

Return the existing ErrMissingName in both cases. InitPlugins() already
skips files that fail to parse, so the plugin keeps its directory name.
2026-09-28 23:40:52 +02:00
LondoandLondopy 7484d5f5fa help/colors: remove references to the removed cmc-paper colorscheme (#4235)
Co-authored-by: Londopy <[email protected]>
2026-09-21 17:53:15 +02:00
Mikko e461ea355a add languages to fenced code blocks in docs (#4227) 2026-09-20 14:38:56 +02:00
LondoandLondopy 228f5586ce Fix typo and dead snap link in README (#4234)
Co-authored-by: Londopy <[email protected]>
2026-09-20 13:44:39 +02:00
Jöran Karl 53824a487f Merge pull request #4231 from JoeKar/feature/plugin-deinit
plugins: Run `deinit()` on `exit()` of `micro`
2026-09-20 13:40:35 +02:00
Jöran Karl 2e76eb4e1b micro: Run plugin's deinit() on exit()
This allows plugins to do some cleanup short before micro is exited.
2026-09-17 18:44:44 +02:00
Jöran Karl 289fc03b9f micro: Remove Screen.Fini() on recover()
The screen is usually closed with `exit()`.
This was overseen in commit e15bb88270 (#3273).
2026-09-17 18:44:38 +02:00
Mikko ee457f606b improve vi syntax highlighting (#4222)
* simplify string highlighting to reduce likelihood of false positive matches
* highlight registers
* support more keywords
2026-09-14 22:38:54 +02:00
MikkoandJöran Karl 6b19798535 detect jinja filetype from file extension (#4223)
* detect jinja filetype from file extension

* also detect .jinja2

Co-authored-by: Jöran Karl <[email protected]>

---------

Co-authored-by: Jöran Karl <[email protected]>
2026-09-12 17:02:41 +02:00
Mikko 6f2601f20e add default keybindings CtrlShiftHome and CtrlShiftEnd (#4214) 2026-09-10 23:25:04 +02:00
Neko Box Coder 393cf24858 Fixing commandbar/plugin autocomplete regression from #4028 (#4200)
PR #4028 moved the check for autocomplete from action autocomplete to
the buffer one, which caused a few regression for upstream callers
(commandbar autocomplete & plugins that use buffer autocomplete)
that use the buffer autocomplete.

This commit restores pre #4028 behavior by adding a callback variant
for buffer autocomplete functions while keeping the multi-cursor
autocomplete function.
2026-09-01 00:32:35 +02:00
Artem Lytkin 756bcc183d plugin: linter: Use filepath.Base() to compare the linted file (#4179)
The plugin's own `basename()` only treated `\` as a separator on Windows,
so a linter reporting `a/b/d.c` for a buffer opened as `a\b\d.c` produced
no match and its messages were silently dropped. Windows accepts both
separators and a linter is free to normalize the path it prints.

`filepath` is already imported here and `filepath.Base()` handles both
separators on Windows while treating `\` as a regular filename character
everywhere else, so the hand-rolled helper can go away.

Fixes #3963
2026-08-27 18:06:54 +02:00
usfbih8uandusfbih8u b62ef421c7 fix(runtime): TrimLeft() -> TrimPrefix() in fixPath() (#4184)
Closes #2802

Co-authored-by: usfbih8u <>
2026-08-27 18:03:48 +02:00
usfbih8uandusfbih8u 1e666bd44e docs(internal/buffer): remove the reference to the old ToCharPos function (#4182)
The function was removed in commit `dc68183fc114ab2911d6ba934cf5df019566d0cf`.

Co-authored-by: usfbih8u <>
2026-08-27 18:03:27 +02:00
usfbih8uandusfbih8u 22930a5087 fix(plugin/autoclose): remove unused utf8 import() (#4168)
Co-authored-by: usfbih8u <>
2026-08-25 20:13:53 +02:00
redstiandredsti 4c47a2713a Autocomplete support for multiple cursors (#4028)
Co-authored-by: redsti <[email protected]>
2026-08-24 18:45:24 +02:00
Jöran Karl 0922ee4741 Merge pull request #4175 from JoeKar/test/gofmt
test: Check `gofmt` results
2026-08-18 19:00:47 +02:00
Jöran Karl 6e6324710c test: Check gofmt results
We like to have gofmt-ed files present in PRs before a review is done.
To reach this we let the PR test fail in the moment the files are not properly
formatted.
2026-08-17 21:16:25 +02:00
Jöran Karl 866ccb0581 Add .gitattributes to force LF for *.go files
This is required for tools like `gofmt` to process the files on all platforms
the same. Otherwise it marks every file with CRLFs as unformatted.
2026-08-17 21:16:20 +02:00
usfbih8u 1c8b82b32e fix(buffer/eventhandler): MultipleReplace() comment (#4169) 2026-08-09 13:50:30 +02:00
Jöran Karl c409c38c7a Merge pull request #4159 from 3x/master
Small colorscheme updates and fixes
2026-08-09 13:43:57 +02:00
Joachim Kołodziejski 6013900dc9 Add .libsonnet file type to jsonnet syntax highlighting (#4163) 2026-08-07 18:54:05 +02:00
Puneet Dixit 0e0f16cbe1 Merge pull request #4116 from puneetdixit200/fix-plugin-info-json5
fix: parse plugin repo metadata as JSON5
2026-08-07 18:52:06 +02:00
Jöran Karl 4605a3806a Merge pull request #4126 from JoeKar/feature/style-attributes
colors: Add `blink`, `dim` and `strikethrough` to the colorscheme attributes
2026-08-03 22:53:43 +02:00
Jöran Karl 5bff230b34 test: Fix colorscheme_test to compare against the tcell attributes type
Otherwise assert.NotEqual() still passes since the attributes type is not int.
2026-08-02 19:31:20 +02:00
bdn 0fe308c64d Add "indent-char" values for themes missing a value 2026-08-01 18:54:39 -04:00
bdn ce7faa219d Fix unreadable text in "sunny-day" theme
Micro's terminal library tcell interprets the color "0" as your terminal's
default text color, which is white or very light for most dark-themed
terminals. This makes the text almost unreadable when using the sunny-day
theme with a dark terminal! I'm changing the default color to black to match
the screenshot provided from the original theme source.

https://github.com/dwwmmn/micro-sunny-day
2026-08-01 18:49:48 -04:00
Jöran Karl 355d965b6b colors: Add blink, dim and strikethrough to the colorscheme attributes 2026-07-17 09:27:21 +02:00
Jöran Karl 77de728b87 README: Remove retired Go Report Card (#4144)
https://github.com/gojp/goreportcard was archived on 2026-07-01.
https://goreportcard.com/ and the badge link currently
lead to a farewell message.
2026-07-14 19:22:01 +02:00
Neko Box Coder 4c2704021c Fixing resize split can cause crashes when node is root (#4139)
Fixing resize split can cause crashes when node is root.

"Regression" of #3983 where ResizeSplit() assumed that the root node
always has a single child which aligns to the previous behavior
2026-07-13 18:33:51 +02:00
Neko Box Coder 25a1b0a2a8 Using file complete for the save command (#4140)
Using file complete for the save command. This is useful when trying to
save as a different file or simply auto complete the directories you
want to save to
2026-07-12 21:59:48 +02:00
Andrew Whitworth de6b5b1768 Add -exec CLI argument to execute commands when micro starts (#4132)
This argument allows us to execute one or more commands immediately
after editor initialization.
This is useful in cases where you know you are going to want to open
two panes immediately, or for scripting purposes so you can start
with certain things set up, or if you want to execute certain plugin
actions at startup, etc.

Usage:
	micro -exec "...cmd..."
	micro -exec "cmd1" -exec "cmd2" -exec "cmd3" ...

(multiple commands are gathered into an array and executed in order)
Commands are executed after plugin initialization, so you can use
plugin commands as well.

Updated man page with information about the new argument.
2026-07-09 19:01:30 +02:00
Jöran Karl ee8f6de484 buffer: Remove buffer invalidation in CloseOpenBuffers() (#4133)
This resolves issue #4131, and a local copy is used to prevent the issue
resolved by #2898 from recurring.
2026-07-09 18:48:34 +02:00
Art Chaidarun e4a92a19d9 Add tabalways option to always show tab bar (#4120) 2026-06-25 19:01:18 +02:00
Mikko 596ffb5152 improve justfile syntax (#3018) 2026-06-25 18:57:36 +02:00
Jöran Karl 363cd2bb40 github/workflows: Bump actions to retire usage of Node20 (#4121)
This follows the deprecation notice published under:
https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
2026-06-11 19:41:43 +02:00
Jöran Karl b75cfc79a1 Merge pull request #4087 from dmytrovoytko/dmytrovoytko-patch-1
Make missing plugin repo errors more informative
2026-06-01 18:00:36 +02:00
Dmytro Voytko 147f2c112a Empty return consistency (nil) 2026-05-31 11:37:38 +00:00
Dmytro Voytko 1c6b849a65 Make missing plugin repo errors more informative 2026-05-30 21:36:10 +00:00
Mikko 0b551d813f syntax: remove nonexistent nushell comment syntax (#4102) 2026-05-28 20:50:21 +02:00
Dmytro Maluka 85a3d79f97 Clean up after the last commit's sloppiness 2026-05-19 23:49:44 +02:00
Antoine Beaubien 7b1d191b83 Show array value type for pluginchannels and pluginrepos (#3617)
* Show array value type for pluginchannels and pluginrepos

Since the options pluginchannels and pluginrepos can have arrays of values, this should be what is in the default values.

It's even more obvious with pluginrepos since two consecutives ticks don't render as an empty formatted, but just the normal 2 caracters.

* Update default value description for indent-char

Show that it's an empty string (instead of 2 backticks that are  rendering marks).
2026-05-19 20:53:46 +02:00
Antoine Beaubien 934dac4301 Add copypaste to the help documentation list of help sections (#4098)
Add documentation for the 'copypaste' feature in help.md.
2026-05-18 21:28:35 +02:00
Jöran Karl 253065a4af Merge pull request #3997 from JoeKar/fix/symlinks
buffer: Store potential resolved symlinks as `AbsPath`
2026-05-04 19:07:24 +02:00
Jöran Karl 2cb49c4653 buffer: Resolve symlinks in file paths
Otherwise we can't identify if we have the same file open multiple times via
different symlinks.
The test must be adapted to resolve symlinks in `findBuffer()`.
2026-04-28 19:20:51 +02:00
Aolinge bd0003b9c0 Fix README capitalization (#4081) 2026-04-26 18:01:34 +02:00