Commit graph

118 commits

Author SHA1 Message Date
Dmytro Maluka
24406a5ae8 Comment plugin: doc: fix incorrect keybinding 2024-04-25 01:28:34 +02:00
Dmitry Maluka
c52ccad14b hltrailingws: adjust autoclose plugin implementation
Fix unwanted highlighting of whitespace in the new line when inserting
a newline after a bracket (when hltrailingws is on). To fix it, change
the order of operations: insert the new empty line after all other
things, to avoid moving the cursor between lines after that.
2024-03-14 03:10:33 +01:00
Zachary Yedidia
7dd88c2f23 Don't auto-detect commenttype if last_ft is empty
Also fixes commenttype for batch files.

Fixes #2752
2023-02-15 21:57:12 -08:00
Rein F
eb6daab169
Make the commenttype option useful (#2735) 2023-02-05 18:30:12 -08:00
Dmitry Maluka
f1801f1958
Comment plugin: improve commenting multi-line selection (#2668)
When commenting a block of multiple lines, the comment symbol is added
right before the first non-whitespace character in each line, e.g.:

void somefunc(int a)
{
    // if (a) {
        // a += 2;
        // printf("a = %d\n", a);
    // } else {
        // printf("none");
    // }
}

which isn't quite nice.

Change it to add the comment at the same position on each line, which is
the position of the leftmost non-whitespace in the entire block, e.g.:

void somefunc(int a)
{
    // if (a) {
    //     a += 2;
    //     printf("a = %d\n", a);
    // } else {
    //     printf("none");
    // }
}

Ref #2282
2023-01-11 21:54:59 -08:00
Matthias Thym
dd8e341de2
Fix linter help formatting (#2280) 2021-11-17 12:59:16 -08:00
Zachary Yedidia
bb609467dd Update comment filetype when commenting 2021-08-20 14:42:38 -04:00
Zachary Yedidia
403a9eb11d Add rust clippy linter and go vet linter 2021-08-18 01:08:54 -04:00
Ali Kefia
ae0c28a03d
Fix name collision on linter name (swiftc) (#2158) 2021-07-18 18:30:52 -04:00
Ali Kefia
1a5518ebbb
Shellcheck as a new shell linter + runtime.go out of git control (#2157)
* shellcheck as a new shell linter + runtime.go out of git control

* keep runtime.go and keep both shfmt and shellcheck since we can remove from custom conf
2021-07-16 15:01:50 -04:00
vandervoortj
9ceb69921a
Add nix language syntax (#2024)
* Create nix.yaml

Add nix language syntax

* Add nix-linter
2021-06-15 17:56:31 -04:00
Jeff Zhao
ee9c78dc86
Improve linter performance (#2083)
Only compute args if we are actually going to use it
2021-06-01 19:34:10 -04:00
Zachary Yedidia
2fbeb40bf0 Update hlint format 2020-12-20 16:53:18 -05:00
Ryan Westlund
1343955b05
Add comment support for OCaml (#1776) 2020-07-15 14:13:44 -04:00
Zachary Yedidia
781a2dd826 Add flake8 linter, postinit and preinit
Closes #1768
2020-07-13 13:28:26 -04:00
Zachary Yedidia
a52dbb2142 Fix swift linting problem 2020-07-09 18:08:14 -04:00
Zachary Yedidia
41a27cc58a Update linter to include eslint
Ref #1766
2020-07-09 18:04:40 -04:00
Zachary Yedidia
3d387732c4 Update linter documentation
Ref #1766
2020-07-09 17:58:42 -04:00
Zachary Yedidia
621e4e9e4d Slight performance improvement 2020-07-05 15:54:00 -04:00
Zachary Yedidia
806525c3da Improve comment plugin
When commenting a selection, the plugin won't just toggle each
line individually but will only uncomment the block if it is all
comments.

The comment plugin also now takes into account any number of spaces
between the comment character and the text. For example '//comment' will
be uncommented properly, as well as '//      comment'.

Fixes #1758
2020-07-05 15:48:49 -04:00
Zachary Yedidia
5f62f550f3 Add more functions to customize status bar
Adds `status.lines`, `status.vcol`, `status.bytes`, `status.size`,
and exposes some functions from go-humanize to plugins.

Ref #1727
2020-06-24 17:19:42 -04:00
Zachary Yedidia
891b117a33 Bind Ctrl-/ (CtrlUnderscore) in comment plugin 2020-06-18 17:18:34 -04:00
Hugo Locurcio
5bfc892a74
Add support for dozens more languages to the comment plugin (#1729) 2020-06-16 00:49:07 -04:00
Ryan Westlund
1793b6268b
Add comment support for Haskell (#1728) 2020-06-15 16:11:51 -04:00
Ján Priner
b2261fc225
Add latex support in comment plugin (#1725) 2020-06-12 12:58:51 -04:00
Zachary Yedidia
9a22d93ea2 Expose CharacterCount to plugins 2020-05-20 18:04:00 -04:00
jsyedidia
299af4a3db
Update hlint to 3.0 syntax (#1659) 2020-05-16 13:06:55 -04:00
jsyedidia
a76bf02f5f
Add Haskell linter hlint to linter plugin (#1610) 2020-04-05 14:05:01 -04:00
allanderek
ee157f6503
Add elm as a default comment type in the comment plugin. (#1586) 2020-03-24 10:56:50 -04:00
Zachary Yedidia
943ea15fa3 Fix linter c++ entry
Fixes #1578
2020-03-14 15:40:05 -04:00
Zachary Yedidia
b91242124c Go lint the current directory of file
Closes #1520
2020-02-18 21:40:14 -05:00
Zachary Yedidia
12c286f9b1 Introduce IndentLine action
Closes #1476
2020-02-12 13:30:24 -05:00
Zachary Yedidia
8224037080 Don't block when redraw channel becomes full
Fixes #1497
2020-02-11 20:03:32 -05:00
Zachary Yedidia
bdf9e6d3a4 Merge branch 'diff-gutter' of https://github.com/p-e-w/micro 2020-02-10 00:28:43 -05:00
Zachary Yedidia
8a907956d1 Use actual lua functions for callbacks instead of strings 2020-02-08 15:49:41 -05:00
Philipp Emanuel Weidmann
de33eac058
Add diff gutter 2020-02-08 13:26:24 +05:30
Zachary Yedidia
106ba48079 Add some docs for linter, comment, status 2020-02-07 11:32:12 -05:00
Zachary Yedidia
bcb1947a0a Add plugin manager 2020-02-01 23:54:38 -05:00
Zachary Yedidia
46c5a81b0d Fix callback cancelation 2020-01-30 18:04:17 -05:00
Zachary Yedidia
59146cabb1 Add callback option to linter 2020-01-30 18:00:17 -05:00
Zachary Yedidia
dc4da37908 Add "paste" option to enable aggressive pasting
Ref #1043
2020-01-02 12:42:39 -05:00
Zachary Yedidia
1b73abcfd0 Fix formatting in plugin info.json 2019-12-29 00:03:21 -05:00
Zachary Yedidia
29a5cef559 Update default plugins slightly 2019-12-28 22:39:57 -05:00
Camille
351c7b099a
Replace tab with spaces 2019-12-28 22:38:41 +01:00
Zachary Yedidia
629f20720a Fix add runtime file for local plugins 2019-12-27 20:28:25 -05:00
Zachary Yedidia
94ff79e7b2 Lua prompt support and plugin improvements 2019-12-25 17:05:11 -05:00
Zachary Yedidia
7f32d31108 Fix plugin names 2019-12-25 17:05:11 -05:00
Zachary Yedidia
adaddba696 Add plugin info.json support 2019-12-25 17:05:11 -05:00
Zachary Yedidia
26c545267d Support column marking in linter 2019-12-25 17:05:11 -05:00
Zachary Yedidia
bc6dd990e5 Improve gutter messages 2019-12-25 17:05:11 -05:00