Frank LENORMAND
b36f7b8440
rc kakrc: Highlight numbers
2020-10-23 14:31:38 +03:00
Frank LENORMAND
72e2b4a9be
rc kakrc: Highlight str-to-str-map
types
2020-10-23 14:28:43 +03:00
Johannes Altmanninger
637153270f
rc git: indented # is not a comment in commit message
...
Git includes them in commit messages and notes, which is sometimes useful
when adding shell script snippets:
# this is included in the commit message!
Also, in rebase buffers, # only marks a comment if it is the first nonblank
character in a line.
2020-10-21 22:08:35 +02:00
Johannes Altmanninger
816bdc91f6
rc fish.kak: split fish-insert hook out from fish-indent
...
Same as in sh.kak; this allows to only disable the insert hook using
%opt{disabled_hooks}.
2020-10-19 19:01:17 +02:00
Johannes Altmanninger
335ee743a4
Fix overzealous closing of ruby heredocs
...
Fixes #2516
2020-10-19 19:01:17 +02:00
Johannes Altmanninger
19391f8c02
rc perl: quoted heredocs can be empty
...
Also the closing line cannot have any trailing characters.
Leading tabs are allowed if <<~ is used.
2020-10-19 19:01:17 +02:00
Jason Felice
b6df40c586
rc nix: dash in extra_word_chars
2020-10-19 11:53:08 -04:00
Maxime Coste
296937a2a2
Merge remote-tracking branch 'Carsenal/perl_regex_highlighters' into master
2020-10-19 20:23:57 +11:00
Maxime Coste
a716923546
Merge remote-tracking branch 'SeerLite/markdown-raw-attributes' into master
2020-10-19 20:23:11 +11:00
Maxime Coste
8153f34a04
Merge remote-tracking branch 'voroskoi/gopls-fix' into master
2020-10-19 20:09:31 +11:00
Maxime Coste
2f8e8e542a
Merge remote-tracking branch 'johnisom/sql-highlighting' into master
2020-10-19 20:08:50 +11:00
Maxime Coste
61f08e84f8
Merge remote-tracking branch 'eraserhd/nix-dash-fix' into master
2020-10-19 20:08:18 +11:00
voroskoi
dd6a275c3e
gopls.kak: use nop for removing temp dir
...
Co-authored-by: Frank LENORMAND <1379068+lenormf@users.noreply.github.com>
2020-10-17 09:47:07 +02:00
VÖRÖSKŐI András
cbbab07aab
gopls: Fix format/imports error reporting
...
Remove unnecessary single quotes and whitespaces in %file{}
Do not delete error file before sending to debug buffer
Fix gopls definition error handling and empty sting check
Silence shellcheck warnings
2020-10-16 22:40:58 +02:00
Michał Kruszewski
4aabe33a24
Add support for VHDL filetype.
2020-10-15 09:21:04 +02:00
John Isom
860e8d55eb
Fix function highlighting by adding lazy instead of greedy regexp quantifier
2020-10-14 14:54:43 -06:00
Jason Felice
c1f67972e4
rc nix: handle dashes embedded in identifiers
...
Some experimentation at the REPL showed that any number of leading dashes
are operators, while embedded dashes are identifier characters.
Closes #3803 .
2020-10-14 07:55:06 -04:00
Maxime Coste
1de058cdf8
Fix rust highlighting after regions highlighter behaviour change
2020-10-12 13:04:08 +11:00
SeerLite
a06dcf8c10
markdown.kak: Support pandoc's raw_attribute
2020-10-11 20:53:39 -03:00
Carson Riker
21fbda7c68
Fixed ending of region, as per @krobelus
2020-10-09 13:25:26 -04:00
Carson Riker
30d5aa203d
Added highlighted for curly-brace based sregexes
2020-10-09 10:45:42 -04:00
Maxime Coste
600be827b3
Merge remote-tracking branch 'pickfire/indent-yaml' into master
2020-10-08 19:51:05 +11:00
Maxime Coste
7fefb206dc
Merge remote-tracking branch 'SeerLite/lua-fixes' into master
2020-10-08 19:50:41 +11:00
Ivan Tham
c148fdbe9a
Rust always indent after {
2020-10-04 23:40:49 +08:00
Ivan Tham
b0ae30a443
Add missing rust indent after function {
2020-10-04 14:19:33 +08:00
SeerLite
3c3a4ec985
lua.kak: Correct -trim-indent hook and fix indent
2020-10-03 16:38:43 -03:00
Ivan Tham
1809035c15
Yaml indent after -
2020-10-02 14:24:04 +08:00
Maxime Coste
9401a9fd25
Merge remote-tracking branch 'Screwtapello/extensible-docs' into master
2020-10-01 22:16:23 +10:00
Maxime Coste
fcabffefe1
Merge remote-tracking branch 'pickfire/rust-indent' into master
2020-10-01 19:07:05 +10:00
Maxime Coste
88f6b65f35
Merge remote-tracking branch 'lboklin/master' into master
2020-09-30 21:29:38 +10:00
Maxime Coste
c9b4b0e355
Merge remote-tracking branch 'tototest99/ninjafile-upd' into master
2020-09-30 19:43:11 +10:00
Ivan Tham
bfca07da4d
Rust not to indent on hash
2020-09-30 00:37:35 +08:00
Ivan Tham
56e12013c8
Rust indent keyword check boundary
2020-09-28 00:09:12 +08:00
Ivan Tham
df68a77ed2
Rust reindent where to match block
2020-09-28 00:03:53 +08:00
Ivan Tham
785cbaeaed
Add rust test for empty line indent
2020-09-27 23:34:08 +08:00
Ivan Tham
5c8dfcdfa9
Rust improve align after partial statement
2020-09-27 15:53:15 +08:00
Ivan Tham
11d98a07dc
Rust align open paren for if and for
2020-09-27 15:52:42 +08:00
Simon Fowler
83277d5545
Improve shell indentation implementation.
...
Use the custom object match command for copying indentation of blocks,
rather than simply increasing/decreasing indentation when start and end
statements are encountered.
This fixes an issue where a newline added after an already correctly
placed `else` or `fi` would trigger an unnecessary deindent. Tests have
been added to ensure no regression in this behaviour.
2020-09-26 22:10:31 +10:00
antab
737134b993
fix: improve regex for build region
2020-09-22 13:49:11 +02:00
Maxime Coste
dd1a582b30
Merge branch 'patch-3' of http://github.com/blaggacao/kakoune into master
2020-09-22 21:28:41 +10:00
Maxime Coste
c6bfce0350
Merge remote-tracking branch 'Screwtapello/spell-replace-prompt' into master
2020-09-22 21:26:22 +10:00
Maxime Coste
fa375d1c46
Merge remote-tracking branch 'krobelus/dont-highlight-escaped-expansion' into master
2020-09-22 21:23:00 +10:00
Maxime Coste
154e11181f
Merge remote-tracking branch 'krobelus/perl-quoting' into master
2020-09-22 21:20:14 +10:00
Maxime Coste
57208a5481
Merge remote-tracking branch 'm-kru/go_kak_fix' into master
2020-09-22 21:18:52 +10:00
David Arnold
0d476aaa95
just: highlight function expressions
2020-09-22 00:24:29 -05:00
Tim Allen
93e5a3b51f
spell.kak: Replace "kak -f" with "sed" for efficiency.
2020-09-22 01:29:03 +10:00
antab
d0ee3dfe94
fix: add subninja and include to static_words
2020-09-21 13:41:19 +02:00
antab
d5ccdcfed4
fix(ninja filetype): add subninja and include declarations and fix builddir highlights
2020-09-21 13:34:27 +02:00
Tim Allen
f75f484b84
spell.kak: Present spelling suggestions with :prompt
...
Previously, spelling suggestions were presented with the :menu command,
requiring the user to cycle through wild and fanciful alternatives to get to the
one they wanted. Now, we present suggestions with the :prompt command, which
allows the user to type to filter down the list, and also to customise the
replacement after they've chose it (perhaps to fix capitalisation or add
apostrophe-S).
We also use the mispelled word as the initial content of the prompt. That
filters out the wildest alternatives by default, and allows the user to edit the
original word instead of forcing them to choose from among the suggestions. To
get the full list of suggestions, it's easy enough to just backspace until the
word you want appears in the list.
2020-09-21 21:07:35 +10:00
Michał Kruszewski
f78cd6daf8
Improve '}' auto inserting for go language.
...
Adding "} else if ... {" was not correctly handled.
2020-09-20 12:25:26 +02:00
Johannes Altmanninger
50775b26e4
*sh.kak: do not highlight expansions if their $ is escaped
2020-09-19 08:06:46 +02:00
Johannes Altmanninger
19b54a8a6e
Highlight more Perl quoting syntaxes
...
This adds highlighting for
- quoting operators qw, qr, and qx, like `qw< some words >`
- angle brackets after a quoting operator, like `q<string>`
- punctuation as quoting delimiter, like `q|string|`
- POD sections, which start with ^=\w and and with ^=cut
- heredocs; the marker can be a bare word, or a quoted word, like
print <<~ 'EOF'
single quoted heredoc
EOF
Closes #3736
No attempt is made to use different highlighting for interpolated (qq or
"") strings just yet. Recognizing quote boundaries is more important.
2020-09-18 20:55:12 +02:00
Frank LENORMAND
4025ac8167
rc modeline: Print the final command directly
2020-09-18 15:12:13 +03:00
Frank LENORMAND
2a51ebf105
rc modeline: Factorise the use of kakquote
2020-09-18 15:12:13 +03:00
Frank LENORMAND
2d78b0760d
rc modeline: Error out on unsupported formats
...
This commit makes `:modeline-parse` grab all lines that look like
modelines, and lets the parser deal with invalid formats.
This allows actually printing an error on unsupported modelines
formats, instead of ignoring them upfront.
2020-09-18 14:54:57 +03:00
Frank LENORMAND
30ee97386d
rc modeline: Use more idiomatic shell
2020-09-18 14:54:57 +03:00
Frank LENORMAND
7731fe4cb2
rc modeline: Print error messages correctly
2020-09-18 09:01:32 +03:00
Frank LENORMAND
6976b1dce4
rc modeline: Prevent command execution
...
This commit prevents specially crafted modelines from making the
editor execute arbitrary Kakoune commands.
By using a tabulation character as a separator, commands can be
injected in the value of the options listed in the modeline. For
example:
# kak: tabstop=2;set-option buffer pwned yes
Fixes #3735 .
2020-09-18 09:01:32 +03:00
Maxime Coste
dbd7e4da79
Merge remote-tracking branch 'voroskoi/gopls' into master
2020-09-17 19:49:33 +10:00
Maxime Coste
fd658f6995
Merge remote-tracking branch 'lenormf/fix-3733' into master
2020-09-17 19:39:48 +10:00
Maxime Coste
b8f56a65ed
Merge remote-tracking branch 'deviant/add-go-alternative-file' into master
2020-09-17 19:38:59 +10:00
Maxime Coste
cb047a4a7d
Merge remote-tracking branch 'tototest99/ninja-syntax' into master
2020-09-17 19:34:54 +10:00
Maxime Coste
81163ce48a
Merge remote-tracking branch 'Aajn/python-highlighter' into master
2020-09-17 19:33:51 +10:00
VÖRÖSKŐI András
9fe1a2a9a4
gopls: fixes based on krobelus@ review
2020-09-16 21:58:22 +02:00
antab
810689ad60
fix: variables adjacent to =
and in build declaration
2020-09-16 21:09:27 +02:00
Frank LENORMAND
95c095f3fb
rc modeline: Don't select more lines than configured
...
This commit addresses an off-by-one error that selected `modelines`+1
lines when looking for modelines in a buffer.
Note that setting `modelines` to 0 will still select one line.
Fixes #3733 .
2020-09-16 11:00:15 +03:00
antab
ea4f2b8837
feat: add basic ninjafile support
2020-09-16 00:03:17 +02:00
David Arnold
1ff9895fe4
just: re-implment bash/sh interpreter
2020-09-15 16:32:07 -05:00
David Arnold
3857696df6
just-highlighter: pre call out to shebang regions
2020-09-15 16:10:40 -05:00
David Arnold
3770baaab0
fix justfile highlighter
...
This fixes serveral shortcomings of the current implementation:
- valid recipt definitions eg
foo bar="quz":
where previously interrupted by justfile/double_string
and therefore they where not highlighted correctly
- global variable assignments where not captured at all
2020-09-15 15:52:00 -05:00
Piotr Chrominski
bfbf4d2080
Fix python docstring highlighter
...
Escaped ' or " at the end of a docstring no longer break highlighting.
2020-09-15 22:01:55 +02:00
VÖRÖSKŐI András
2b18b1d088
rc/go-tools.kak: remove
...
Working functions replaced by gopls
Use kak-lsp if you need in place documentation and autocompletion
2020-09-15 01:02:19 +02:00
VÖRÖSKŐI András
568020d67b
rc gopls.kak: initial import
...
Add support for the following gopls commands:
- format
- imports
- definition
- references
Thanks krobelus@ and lenormf@ for their review and suggestions.
2020-09-15 01:01:35 +02:00
V
c6b7e3d74a
Add :alt command for go files
2020-09-10 00:23:46 +02:00
Maxime Coste
6f260c2ab2
Merge remote-tracking branch 'm-kru/latex' into master
2020-09-08 19:06:56 +10:00
Michał Kruszewski
0f63dd339a
Provide better support for Go language.
...
1. Highlight short variable declaration operator :=.
2. 'while' is not go keyword.
3. Auto insert ')', '}', when line ends with '(' or '{'.
2020-09-07 21:48:06 +02:00
Maxime Coste
cfbff4e132
Merge remote-tracking branch 'kayhide/purescript-filetype' into master
2020-09-06 11:23:48 +10:00
Maxime Coste
c98d6c3062
Merge remote-tracking branch 'krobelus/initialize-shell-vars' into master
2020-09-06 10:52:07 +10:00
Maxime Coste
cf7955cdfb
Merge remote-tracking branch 'lenormf/docstring-newline-format' into master
2020-09-06 10:50:51 +10:00
Maxime Coste
f84c550d30
Apply suggestions from code review
...
Co-authored-by: Screwtapello <thristian@gmail.com>
Co-authored-by: Johannes Altmanninger <aclopte@gmail.com>
2020-09-06 10:56:37 +10:00
Maxime Coste
22676647fe
Merge remote-tracking branch 'krobelus/python-no-indent-after-comment' into master
2020-09-06 10:48:49 +10:00
Maxime Coste
97fd0c0510
Merge remote-tracking branch 'lenormf/repl-normalise' into master
2020-09-06 10:48:08 +10:00
Michał Kruszewski
705712f13b
Improve latex support.
...
Auto insert "\end{[word]}" for "\begin{[word]}".
2020-09-05 16:14:22 +02:00
Tim Allen
a25cc215e8
Reference content goes in docstrings, explanations go in prose docs.
...
Also, make sure docstrings reference the prose docs, so people who stumble over
an interesting-looking command or option can find out more about it.
2020-09-04 19:20:50 +10:00
Hideaki Kawai
c613e3c7f1
Create purescript filetype
2020-09-04 11:33:08 +09:00
Tim Allen
66cc39cb14
Update plugin docs to not duplicate docstring information.
2020-09-03 17:18:19 +10:00
Tim Allen
9934788155
Add more user-oriented documentation for the documentation system.
2020-09-03 16:49:18 +10:00
Tim Allen
e3298c6320
Address code-review comments
...
- some wording changes in included documentation
- find supports multiple starting paths, we don't need to launch it 3 times
- Change the regex that trims the file extension to only trim the last extension
Some additional things I noticed:
- find should use -L to see through symlinks like the autoload processing does.
- find should check the user's autoload directory first, so users can override
Kakoune's built-in documentation.
2020-09-03 15:21:54 +10:00
Tim Allen
d628cb50cf
rc: Add some documentation for existing plugins..
2020-09-03 01:55:36 +10:00
Tim Allen
4296305171
doc.kak: Also search through plugins (stdlib and per-user) for docs.
...
This makes the somewhat-dubious assumption that every plugin will have uniquely-
named documentation files, instead of automatically putting every plugin's docs
into a namespace. However, plugins already have to deal with flat namespaces for
commands, options, filetypes, etc. so one more shouldn't hurt.
Fixes #2466 .
2020-09-03 01:19:20 +10:00
Frank LENORMAND
0cd706254a
rc clang grep: Make docstrings more readable
2020-09-02 11:57:34 +03:00
Johannes Altmanninger
407c72d90a
Clear unwanted environment variable
...
This adds two things I forgot in
9a7d8df4
(Avoid accidentally using environment variables in sh scopes)
Mea culpa, the problem was that I was skipping matches with "filetype"
because that's usually just a hook parameter as in "WinSetOption filetype=.."
rg --pcre2 '\b(?!filetype=)\w+=' rc/
So I missed these two cases where a shell variable is actually called "filetype".
The one in git.kak was not a problem because show_git_cmd_output is only
ever called with sane inputs. However, file.kak does use the filetype
environment variable for many mime types, for example:
filetype=somefiletype\''; echo -debug injection; nop '\' kak /dev/null
Will run the echo since /dev/null has mime type "inode/chardevice"
2020-09-02 06:54:19 +02:00
Johannes Altmanninger
e1de4aa118
python.kak: Do not indent after comments ending in :
...
Fixes #3693
This will not work for lines like the one below but I think that's okay
because it does work for most comments.
foo() # foo:
2020-09-02 06:44:36 +02:00
Frank LENORMAND
87f9be6723
rc repl: Normalise REPL commands
...
It's unclear what the `send-text` alias does at first glance,
so prefixing it with "repl-" both fixes that and helps make it
discoverable via the command prompt's fuzzy matcher.
The `repl` alias also seems too generic a name, the "-new" suffix
should hopefully give a hint that it creates a new window.
2020-09-01 13:34:52 +03:00
Frank LENORMAND
3145e3e939
rc markdown: Highlight trailing spaces properly
...
This commit addresses the following issues:
* highlight trailing space characters with the `meta` face, instead of
`PrimarySelection`
* make the regex more readable by using a capture group in stead of
`\K`
* specifically match space characters, not other horizontal whitespace
characters
* match two or more space characters
Reference[1]:
> When you do want to insert a <br /> break tag using Markdown, you
> end a line with two or more spaces, then type return.
[1] https://daringfireball.net/projects/markdown/syntax#p
Note that the original reproducer doesn't seem to work anymore,
probably because of changes made to how lists are highlighted.
Fixes #911
2020-09-01 13:12:58 +03:00
Ludvig Böklin
0e84cdb016
Mercury-lang filetype support
2020-08-31 16:36:43 +02:00
Maxime Coste
4793a4e8ce
Allow multiple arguments in tmux repl
...
Fixes #3680
2020-08-30 10:53:03 +10:00
Johannes Altmanninger
9a7d8df447
Avoid accidentally using environment variables in sh scopes
...
On the instances with altfile this was already the case, but this makes it more obvious.
Closes #3673
2020-08-24 19:01:05 +02:00
Maxime Coste
4b7fd68d48
Merge remote-tracking branch 'krobelus/indent-after-keyword'
2020-08-24 19:24:19 +10:00
Maxime Coste
beeaf19801
Merge remote-tracking branch 'krobelus/highlight-nested-variable-expansions'
2020-08-24 19:23:35 +10:00
Johannes Altmanninger
ab76ec981a
Avoid extra indent when line does not end on keyword
...
For example there was an indent after a line like "echo todo" with filetype sh
because the "do" in "todo" was recognised as keyword.
2020-08-23 19:15:52 +02:00
Johannes Altmanninger
473967df04
fish.kak: add missing highlighting for builtins true and string
...
I forgot them last time, sorry for the noise
2020-08-23 19:15:52 +02:00
Johannes Altmanninger
caf9739329
sh.kak: Don't leak highlighting of nested variable expansions
...
Fixes #3675
2020-08-23 19:15:52 +02:00
Maxime Coste
78a7c5fe9b
Merge remote-tracking branch 'alexherbo2/kakrc'
2020-08-23 13:59:41 +10:00
Maxime Coste
7f5959d295
Merge branch 'grep' of http://github.com/vbauerster/kakoune
2020-08-23 13:57:40 +10:00
Alex Leferry 2
3f8d3dcf86
kakrc: Add trigger-user-hook keyword
2020-08-22 23:16:46 +02:00
Maxime Coste
0b3b912ffc
Merge remote-tracking branch 'SolitudeSF/nim'
2020-08-20 19:00:36 +10:00
Maxime Coste
4e4a65e944
Merge branch 'sh-insert' of http://github.com/SeerLite/kakoune
2020-08-17 20:03:12 +10:00
Maxime Coste
83685501ea
Merge remote-tracking branch 'caksoylar/fix-python-ops'
2020-08-17 19:59:43 +10:00
SeerLite
e0c756d943
kakrc.kak: Split auto-insert and auto-indent hooks
2020-08-14 23:43:43 -04:00
SeerLite
1af4a1b1a8
sh.kak: Split auto-insert and auto-indent hooks
2020-08-14 23:42:52 -04:00
Vladimir Bauer
649e252f75
bring *grep* buffer to front in context of toolsclient
2020-08-14 00:52:22 +05:00
Cem Aksoylar
03032d6c3e
Add assignment expression := (walrus) operator
2020-08-12 23:12:35 -07:00
Cem Aksoylar
e9b0e9a57d
Fix <> and ** operators highlighting
2020-08-12 23:11:43 -07:00
Parasrah
151fe01a5c
fix #3651
...
Similar to Jinja, getting `eex` highlighting in *.ex files
will require users to setup a filetype hook similar to the
following:
hook global WinSetOption filetype=elixir %{
require-module eex
add-highlighter window/eex ref eex
}
This is done both to fix a circular dependency between the `elixir`
and `eex` modules, and avoid polluting `elixir` files with false
positives from `eex` highlighting given `eex` is framework specific
2020-08-12 19:14:27 -06:00
SolitudeSF
328ef122ae
Update keywords and suffixes in nim.kak
2020-08-07 12:59:00 +03:00
Maxime Coste
ba7831035f
Merge remote-tracking branch 'johnisom/crystal-filetype'
2020-08-03 18:57:45 +10:00
John Isom
72f658f896
Replace my implementation of crystal-insert-on-new-line with already-existing ruby one
...
This fixed a weird bug where if you were typing in the top level scope of a
program (no indentation before statements), the `end`s wouldn't be inserted
for you.
2020-08-02 11:39:59 -06:00
John Isom
f59bdc614f
Fix typo in comment
2020-08-02 11:33:56 -06:00
John Isom
fdf38ecc5e
Fix auto indentation for if/case and else
2020-08-02 11:28:27 -06:00
John Isom
6cf39a5f4f
Fix auto indentation for if/case and else
2020-08-02 11:22:28 -06:00
Maxime Coste
616f6bbe9b
Merge remote-tracking branch 'krobelus/fail-on-missing-tools'
2020-08-02 16:50:33 +10:00
Maxime Coste
f60b0a1441
Merge remote-tracking branch 'johnisom/ruby-indentation'
2020-08-02 16:25:07 +10:00
John Isom
8a02bafe0d
Beautify indenting in add-highlighter region for percent literals
2020-08-01 13:54:16 -06:00
John Isom
dee96f8e82
Improve syntax highlighting of Ruby percent literals
...
The syntax highlighting has been broken down into 3 main categories:
string: string, array of words
variable: symbol, array of symbols
meta: regexp, shell execution
2020-08-01 13:37:40 -06:00
John Isom
92558bb675
Add rule for % string literals without bracket/style chars; no recurse yet
...
Becuase %Q^hello^ is a perfectly valid Ruby string literal. Strange, I know.
2020-08-01 13:18:47 -06:00
John Isom
e858df3ca2
Add 'else' to auto deindent/align logic in context of 'case' statement
2020-08-01 12:12:48 -06:00
John Isom
57e9719c25
Add 'else' to auto deindent/align logic in context of 'case' statement
2020-08-01 11:57:38 -06:00
John Isom
322d0659fd
Add 'when' to list of keywords that signifies end for ruby-insert-on-new-line
2020-08-01 11:54:57 -06:00
John Isom
dbb548af2d
Fill in implementation of crystal-insert-on-new-line
2020-08-01 11:46:35 -06:00
John Isom
c36583524c
Reorder definition of 3 indent/insert commands
2020-08-01 11:32:16 -06:00
John Isom
0d4dfbc349
Implement copying comment char (#) and whitespace after it
2020-08-01 11:31:28 -06:00
John Isom
8f0843978e
Beautify indentation of 'crystal-indent-on-char'
2020-08-01 11:19:36 -06:00
John Isom
a6329b4bfc
Fix deindentation of end
to make it go to the right level
2020-08-01 11:18:41 -06:00
John Isom
d6e3c1ff19
Fix deindenting nested blocks/statements
2020-08-01 10:52:26 -06:00
John Isom
145f2db741
Add rule to align 'end' with opening statement
2020-08-01 10:35:34 -06:00
John Isom
0fe71ebada
Add deindentation rule for 'rescue' statement
2020-08-01 10:33:35 -06:00
John Isom
21c083f47c
Add rule to align 'when' to 'case'
2020-08-01 10:32:45 -06:00
John Isom
b7490d853d
Add support for deindenting rescue
statment when part of def
(instead of just begin
)
2020-08-01 10:28:54 -06:00
John Isom
76eadef00b
Add rule to align else/elsif to opening if
2020-08-01 10:27:51 -06:00
John Isom
e84ebfdfab
Replace ') <a-&>' with '1<a-&>'
2020-08-01 10:16:48 -06:00
John Isom
2c382de1e8
Add indenting after starting structure/opening statement
2020-08-01 10:08:47 -06:00
John Isom
ee842da85a
Replace manual whitespace trimming to use function created in prev. commit
2020-08-01 09:59:53 -06:00
John Isom
62ac42bb23
Add 'crystal-trim-indent' command
...
This removes trailing whitespaces from the end of lines
2020-08-01 09:58:21 -06:00
John Isom
783fac3d61
Remove single quotes from 'execute-keys -draft ...' keys
2020-08-01 09:56:02 -06:00
John Isom
0063e4c4f5
Collapse 'try %{ execute-keys ... }' blocks to one line
2020-08-01 09:55:15 -06:00
John Isom
73f5f32385
Wrap all 'indent-on-new-line' commands in 'evaluate-commands -no-hook -draft -itersel'
2020-08-01 09:53:51 -06:00
John Isom
b23a85e747
Beautify percent string literals highlighters spacing/indentation
2020-08-01 09:50:27 -06:00
John Isom
0c591baae3
Add 'crystal-indent-on-char' and 'crystal-insert-on-new-line' hooks and functions
2020-08-01 09:49:53 -06:00
John Isom
591cb83da4
Rename 'crystal-new-line-inserted' to 'crystal-indent-on-new-line'
...
This gives the function clear responsibility, whereas the naming
before was unclear
2020-08-01 09:39:08 -06:00
John Isom
3248f7279c
Deindent everything in the 'provide-module crystal...' block
2020-08-01 09:36:14 -06:00
John Isom
a78b6e6ccb
Change 2-space indentation to 4-space
2020-08-01 09:34:55 -06:00
John Isom
5c124db5d9
Replace cat emojis with section signs
...
Many terminal emulators or fonts don't support the cat emoji, and the section
sign (§) is more semantically correct than a cat.
2020-08-01 09:30:12 -06:00
John Isom
dc378da87f
Add section comments to crystal.kak
2020-08-01 09:27:21 -06:00
John Isom
79fa50dc3e
Add namespacing to crystal hooks
2020-08-01 09:24:06 -06:00
John Isom
c793712318
Fix ruby-indent-on-char
2020-07-31 19:24:19 -06:00
Maxime Coste
5292990a0d
Fix invalid quoting in python.kak
2020-07-31 15:45:34 +10:00
Maxime Coste
8d51a99a3b
Merge remote-tracking branch 'pickfire/rust-highlight'
2020-07-31 07:50:14 +10:00
Kylie McClain
25dafd55fe
asciidoc: Add a highlighters for links
2020-07-30 16:56:56 -04:00
Kylie McClain
a2c378c7b3
asciidoc: Add a highlighter for admonition paragraphs
2020-07-30 16:56:56 -04:00
Kylie McClain
e845495cc3
asciidoc: Add a highlighter for [%options]
2020-07-30 16:56:56 -04:00
Kylie McClain
b52c2a532d
asciidoc: Add support for negated attributes
2020-07-30 16:56:56 -04:00
Kylie McClain
ad2f61f91a
asciidoc: Add a highlighter for list titles
2020-07-30 16:56:56 -04:00
Kylie McClain
04721b8425
asciidoc: Add a highlighter for in-word italics as well
2020-07-30 16:56:52 -04:00
Kylie McClain
a8f3ff21dd
asciidoc: Add a highlighter for attribute referencing
2020-07-30 16:50:33 -04:00
Kylie McClain
41532cd3e0
asciidoc: Add comments for clarity
2020-07-30 16:50:31 -04:00
Kylie McClain
7274092955
asciidoc: Add a highlighter for in-word bolding
2020-07-30 16:46:11 -04:00
Maxime Coste
76f1b7a5f9
Merge remote-tracking branch 'tmccombs/asciidoc-comments'
2020-07-30 21:22:17 +10:00
Maxime Coste
1efeb75e83
Merge remote-tracking branch 'somasis/asciidoc-bullet-fix'
2020-07-30 21:18:57 +10:00
Maxime Coste
55fbdb3606
Merge remote-tracking branch 'johnisom/deindent-closing-braces'
2020-07-30 21:14:37 +10:00
Maxime Coste
b322a1f29c
Merge remote-tracking branch 'krobelus/highlighting'
2020-07-30 21:09:04 +10:00
Maxime Coste
ac24b72f61
Merge remote-tracking branch 'pickfire/patch-1'
2020-07-30 21:07:26 +10:00
Maxime Coste
e4c27df5f5
Merge remote-tracking branch 'krobelus/done-deindent'
2020-07-30 21:07:03 +10:00
Maxime Coste
898945c8db
Merge remote-tracking branch 'krobelus/tmux-terminal-use-client-pane'
2020-07-30 21:05:24 +10:00
John Isom
6258646f41
Fix deindentation in zig.kak
2020-07-29 21:46:51 -06:00
John Isom
4a49868f2c
Fix deindentation in sh.kak
2020-07-29 21:31:21 -06:00
John Isom
085fcc2088
Fix deindentation in scala.kak
2020-07-29 21:25:55 -06:00
John Isom
d5fe3a2b12
Fix deindentation in sass.kak
2020-07-29 21:22:38 -06:00
John Isom
cc30131e16
Fix my issues in gluon.kak
2020-07-29 21:22:20 -06:00
John Isom
6c02f80935
Add indent-on-closing-brace rule to sass.kak
2020-07-29 21:10:43 -06:00
John Isom
e02a3711fa
Fix my issues in gluon.kak
2020-07-29 21:07:43 -06:00
John Isom
d77fe33e9a
Fix my issues in python.kak
2020-07-29 20:45:54 -06:00
John Isom
cf7eab62bd
Fix already-existing error in ragel.kak
2020-07-29 20:41:21 -06:00
John Isom
70d1aa114b
Fix deindentation in protobuf.kak
2020-07-29 20:41:18 -06:00
John Isom
53188e66c7
Fix deindentation in python.kak
2020-07-29 20:41:14 -06:00
John Isom
14514422db
Fix deindentation in ragel.kak
2020-07-29 20:41:05 -06:00
John Isom
858b0dd1c9
Update deindentation in nix.kak
2020-07-29 20:12:54 -06:00
John Isom
5284196cb3
Update deindentation in cue.kak
2020-07-29 17:02:54 -06:00
John Isom
e43981422e
Update deindentation in java.kak
2020-07-29 17:02:50 -06:00
John Isom
9c957167fa
Update deindentation in c-family.kak
2020-07-29 15:14:35 -06:00
John Isom
9560ef3dd5
Update deindentation in gluon.kak
2020-07-29 15:13:36 -06:00
John Isom
1951f19fd8
Update deindentation rule for awk.kak, cabal.kak, go.kak
2020-07-29 15:06:27 -06:00
John Isom
29e94c46e0
Fix already-existing bug in javascript.kak
2020-07-29 15:04:14 -06:00
John Isom
9d4e33c775
Clean up my previous updates
2020-07-29 09:40:58 -06:00
John Isom
bad751197a
Update deindenting in css.kak
2020-07-29 09:35:36 -06:00
John Isom
528feb3422
Update deindenting in dart.kak and javascript.kak
2020-07-29 09:34:29 -06:00
John Isom
4a77566ee6
Update deindenting in cabal.kak
2020-07-29 09:32:43 -06:00
John Isom
21bf092230
Update deindenting in dart.kak
2020-07-29 09:31:20 -06:00
John Isom
2b86826d5a
Fix already-existing error in javascript.kak
2020-07-29 09:28:46 -06:00
John Isom
27705d402f
Update deindenting in javascript.kak
2020-07-29 09:28:32 -06:00
John Isom
f84fd84b26
Update deindenting in json.kak
2020-07-29 09:27:26 -06:00
John Isom
dc4508d05f
Update deindenting in d.kak
2020-07-29 09:07:02 -06:00
John Isom
fb838b9f33
Update deindenting in perl.kak
2020-07-29 08:56:19 -06:00
John Isom
1eb34996e1
Merge branch 'deindent-closing-braces' into HEAD
2020-07-29 08:55:48 -06:00
John Isom
90988f5ee9
Merge commit '84a08982' into HEAD
2020-07-29 08:55:19 -06:00
John Isom
623743e794
Update deindenting in perl.kak
2020-07-29 08:54:19 -06:00
John Isom
ba8fca741c
Update deindenting in kakrc.kak
2020-07-29 08:52:04 -06:00
John Isom
507f799ce4
Fix already-existing bug in perl.kak
2020-07-28 20:52:06 -06:00
John Isom
84a08982db
Update deindenting in perl.kak
2020-07-28 20:51:19 -06:00
John Isom
655c7aad60
Update deindenting in cabal.kak
2020-07-28 20:50:36 -06:00
John Isom
9edbcd4a46
Update deindenting in dart.kak
2020-07-28 20:50:19 -06:00
John Isom
a5a3ce9e1b
Fix already-existing error in php.kak
2020-07-28 20:49:42 -06:00
John Isom
b87b1bd32d
Update deindenting in php.kak
2020-07-28 20:49:17 -06:00
John Isom
2de803ee17
Update deindenting in rust.kak
2020-07-28 20:48:57 -06:00
John Isom
70e68e3064
Update deindenting in php.kak
2020-07-28 16:07:03 -06:00
John Isom
be69d6e173
Update deindenting in latex.kak
2020-07-28 16:06:02 -06:00
John Isom
3bd783c337
Update deindenting in perl.kak
2020-07-28 16:04:35 -06:00
John Isom
8f0b56be1f
Update deindenting in css.kak
2020-07-28 16:03:15 -06:00
John Isom
6cf0856a15
Update deindenting in cabal.kak
2020-07-28 16:02:31 -06:00
John Isom
f3f477aa04
Fix already-existing error in cabal.kak
2020-07-28 16:01:11 -06:00
John Isom
ec48e07b2a
Update deindenting in dart.kak
2020-07-28 15:59:23 -06:00
John Isom
60a1b0cfcb
Update deindenting in javascript.kak
2020-07-28 15:33:20 -06:00
John Isom
d7e9702228
Fix my closer tokens issues in javascript.kak
2020-07-28 15:18:57 -06:00
John Isom
94ab56d123
Fix indentation rule for php.kak
2020-07-28 14:58:42 -06:00
John Isom
85d5f50376
Fix indentation rule for perl.kak
2020-07-28 12:55:21 -06:00
Johannes Altmanninger
7d52bae5cb
rc/x11: failure message when some external tools are missing
...
Addresses #3591
2020-07-28 20:32:56 +02:00
Johannes Altmanninger
6ca51882a1
c-family.kak: fix /**/ being interpreted as javadoc start
2020-07-28 20:32:56 +02:00
Johannes Altmanninger
0fb99f217a
tmux.kak: use TMUX_PANE for tmux-terminal-{horizontal,vertical}
...
In case a user connects to the same Kakoune session from multiple tmux
windows/sessions, this makes the splits appear next to the calling client,
instead the client where the Kakoune session was started.
2020-07-28 20:32:56 +02:00
Johannes Altmanninger
e612f26ec1
rc: conservative comment highlighting for shells
...
Fixes spurious comment highlighting for these examples:
echo \# foo
echo 1#foo
echo 2\ #foo
2020-07-28 20:32:56 +02:00
John Isom
80a5fd2c88
Fix already-existing bug in nix.kak
2020-07-27 21:59:08 -06:00
John Isom
05e8eaac68
Fix indentation rule for nix.kak
2020-07-27 21:58:48 -06:00
John Isom
1d68f8dab9
Fix indentation rule for latex.kak
2020-07-27 21:43:07 -06:00
John Isom
b40a53d26c
Remove extraneous -itersel flag from deindent closing brace after cursor
2020-07-27 21:42:47 -06:00
John Isom
d4fee6b197
Fix indentation for closing chars in kakrc.kak
2020-07-27 21:37:49 -06:00
John Isom
d818ff8ac0
Fix indentation for closing braces in kakrc.kak
...
This fixes %{ }, %< > style, not %| |, %= =, etc
2020-07-27 21:26:17 -06:00
John Isom
fd3716a12b
Fix typo in comment from 9dd292d100
2020-07-27 20:58:25 -06:00
John Isom
01712e7f3c
Change indentation rules in json.kak to be much more intuitive for nested objects
...
As it was before, when you had this (| = cursor):
``` json
{
"foo": {|
}
```
and hit <ret>, this would happen:
``` json
{
"foo": {
|
}
```
when it should have been this:
``` json
{
"foo": {
|
}
```
2020-07-27 20:55:34 -06:00
John Isom
9dd292d100
Fix indentation rule for json.kak
2020-07-27 20:52:35 -06:00
John Isom
8c9afa8a91
Simplify closing brace indentation
...
Edits same line as previous commit. I replaced a complex selection command
with a simple 1-keystroke alternative.
2020-07-27 20:48:10 -06:00
John Isom
f958a318c1
Fix already-existing bug in json.kak
...
When a closing brace or bracket is typed, it should automatically match
indentation with it's opener. Because of an unescaped ']' literal the regexp
didn't work.
2020-07-27 20:47:59 -06:00
John Isom
2044f250ae
Fix indentation rule for javascript.kak
2020-07-27 20:39:44 -06:00
John Isom
cd53d31384
Fix indentation rule for java.kak
2020-07-27 13:50:51 -06:00
John Isom
c0e14b1cfd
Fix existing error regarding indent after opening brace
...
This is in gluon.kak, right above my addition
2020-07-27 13:39:52 -06:00
John Isom
931b90a451
Fix indentation rule for gluon.kak
2020-07-27 13:39:02 -06:00
John Isom
8a079dd82f
Fix indentation rule for d.kak
2020-07-27 13:15:05 -06:00
John Isom
56837aed57
Fix indentation rule for dart.kak
2020-07-27 13:11:32 -06:00
John Isom
1f911f1f8a
Fix indentation rule for cue.kak
2020-07-27 13:09:18 -06:00
John Isom
24afe43cf6
Fix indentation rule for css.kak
2020-07-27 13:06:24 -06:00
John Isom
b57b474f23
Fix indentation rule for cabal.kak
2020-07-27 12:59:15 -06:00
John Isom
0932f3d441
Fix indentation rule for awk.kak
2020-07-27 12:55:25 -06:00
John Isom
9004502049
Update go brace deindenting to handle bad indentation edge case
2020-07-27 12:19:29 -06:00
John Isom
de214d262c
Update rust brace deindenting to handle bad indentation edge case
2020-07-27 12:15:11 -06:00
John Isom
a7567d82c9
Update c-family brace deindenting to handle bad indentation edge case
2020-07-27 12:04:07 -06:00
John Isom
565e3bef1d
Update comment wording for deindentation
2020-07-26 20:46:47 -06:00
John Isom
902f2831d8
Fix indentation rule for go.kak
2020-07-26 20:28:14 -06:00
John Isom
194cb17aae
Fix indentation rule for rust.kak
2020-07-26 20:04:18 -06:00
John Isom
4b35a701c4
Fix indentation rule for c-family.kak
2020-07-26 18:56:53 -06:00
Johannes Altmanninger
35f27030c3
sh.kak: fix don't always deindent around "done"
...
Analogous to #3613
2020-07-25 20:07:18 +02:00
Kylie McClain
600983b7bb
asciidoc: Fix bullet face regular expression
...
Additionally, change the bolding regex to account for this.
Fixes #3605 .
2020-07-23 03:03:13 -04:00
Ivan Tham
1bbc88953e
fix shell fi always deindenting after newline
...
Always align fi to the line before before deindenting it
```
...
test
fi%( )
```
always deindent fi on `o`
2020-07-22 22:27:12 +08:00
Maxime Coste
2df6a57201
Merge remote-tracking branch 'alexherbo2/ruby'
2020-07-21 19:56:43 +10:00
Alex Leferry 2
002e0f8790
Ruby: Better matching of divisions
...
Do not include prefix data in match.
2020-07-20 22:03:27 +02:00
aecepoglu
5396c288a0
ocaml quoted-strings
2020-07-20 13:07:45 +03:00
Maxime Coste
d4962d94ce
Merge remote-tracking branch 'alexherbo2/crystal-style-change'
2020-07-18 14:00:33 +10:00
Maxime Coste
f8c4d7b69a
Merge remote-tracking branch 'alexherbo2/ruby'
2020-07-18 13:54:31 +10:00
Maxime Coste
82a2bcc661
Merge remote-tracking branch 'pickfire/markdown'
2020-07-18 13:52:29 +10:00
Maxime Coste
3aef55be73
Fix highlighting of rgba colors in kakrc
2020-07-18 13:45:27 +10:00
Ivan Tham
34edb1a8e7
Highlight markdown code block with space
2020-07-11 21:06:12 +08:00
Ivan Tham
974684aa68
Improve rust comment closing handling
...
/// foo
///%( )
/// foo
/// %( )
With `c<ret>bar<esc>`,
/// foo
bar
/// foo
///
/// bar
Based on c-family block comment handling, this patch also add rust
block comment indentation.
This affects `o` behavior on empty comment but it allows a way more
efficient way to clear comments.
2020-07-09 23:02:50 +08:00
Alex Leferry 2
2219f0ef78
Ruby: Add support for %{…} percent string literals
2020-07-09 11:24:22 +02:00
Ivan Tham
21c38f37cd
Fix rust character highlight
2020-07-09 00:21:11 +08:00
Ivan Tham
7bd459f774
Fix rust comment end
2020-07-09 00:21:11 +08:00
Ivan Tham
eac5986323
Fix rust doctest non-hidden macro highlight
2020-07-09 00:21:11 +08:00
Ivan Tham
e14cc26f1b
Add default keyword for rust
2020-07-09 00:21:11 +08:00
Ivan Tham
7e09e7fcd5
Update rust rc comment
2020-07-09 00:21:11 +08:00
SolitudeSF
91914a8501
Fix syntax errors.
2020-07-06 14:55:54 +03:00
Simon Fowler
b875a1802c
Implement smarter detection of windowing environments.
...
This patch centralises the loading of windowing environments, in order
to ensure that by default only a single module is loaded, rather than
the current code which can load multiple potentially incompatible
modules; and in order to provide the user with more control over the
loading of windowing modules.
The patch introduces a new str-list option `windowing_modules` which
defines an ordered list of windowing modules to attempt to load. Modules
are loaded in the order specified in the list until a module loads
without error, at which point the process finishes.
When loaded each windowing module tests the environment to determine
whether it should load (e.g. the tmux module tests to see if it's being
run within a tmux session), and if it determines that it should then it
completes its loading without error. If it doesn't detect an appropriate
environment then it returns an error, and the module loading logic tries
the next module.
The user can override the default `windowing_modules` list to specify
their preferred modules (i.e. they can put kitty ahead of tmux if that's
their preference, or they can leave out the x11 modules alltogether). In
addition, if the `windowing_modules` option is an empty list this
bypasses the environment detection logic completely, and allows the
modules to be loaded manually - this allows a user to replace the
windowing module loading logic with their own manual set up.
2020-07-05 22:48:31 +10:00
Thayne McCombs
881c7b9f15
Add comment highlighting and options for asciidoc.
...
Fixes #3068 .
2020-07-04 00:28:51 -06:00
Maxime Coste
1ca1e8fedc
Merge branch 'master' of http://github.com/philgee1981/kakoune
2020-07-03 21:07:04 +10:00
Philman
63c4336a3c
finetuned the :send-text command
...
See discussions on [github](https://github.com/philgee1981/kakoune/pull/1 ) and on [the kakoune message board](https://discuss.kakoune.com/t/trying-to-run-kakoune-repl-with-st-and-dwm/1122/3 )
2020-07-03 06:46:41 +02:00
Maxime Coste
099b83d922
Merge remote-tracking branch 'alexherbo2/eruby'
2020-06-25 21:05:15 +10:00
Maxime Coste
14ba5e38ce
Merge branch 'python_fix_highlight' of https://github.com/m-kru/kakoune
2020-06-25 21:02:52 +10:00
Maxime Coste
f5127f8b22
Merge remote-tracking branch 'lenormf/key-percent'
2020-06-25 20:58:26 +10:00
Maxime Coste
42af5e1f9e
Merge remote-tracking branch 'lenormf/fix-3432'
2020-06-25 20:57:35 +10:00
Maxime Coste
edd0d2d0ef
Merge remote-tracking branch 'eraserhd/more-r7rs-scheme-fixes'
2020-06-25 20:53:12 +10:00
Maxime Coste
b31f3c266f
Merge remote-tracking branch 'ii8/master'
2020-06-25 20:52:52 +10:00
Johannes Altmanninger
7e50bdbf2f
fish.kak: do not treat escaped quotes as region start
...
Just like in sh.kak, for example:
echo \" \\\" this should not be highlighted
2020-06-25 00:28:07 +02:00
Murray Calavera
22a94b9d35
Add highlighters for Standard ML
2020-06-23 19:22:35 +01:00
Jason Felice
c08e676aaf
scheme.kak: fixes for r7rs word characters
...
Was missing _ and @ in various places.
2020-06-17 15:51:47 -04:00
Maxime Coste
8b3696982f
Merge remote-tracking branch 'caksoylar/lint-tools'
2020-06-16 19:10:39 +10:00
Maxime Coste
5c02bb2030
Merge remote-tracking branch 'eraserhd/detect-mime-script-types'
2020-06-16 19:10:01 +10:00
Jason Felice
bdd7ea6a03
Detect text/x-script.* and application/x-* types
2020-06-12 11:29:55 -04:00
Cem Aksoylar
28be53fb39
Make lint.kak utilize toolsclient
2020-06-10 22:39:11 -07:00
Jason Felice
d75792bddd
Improve scheme mode
...
* Add r7rs functions, keywords, etc.
* Add highlighting for decimal, hex, octal, binary constants
* Add missing word characters
* Resolve several issues with word boundaries
2020-06-08 09:17:58 -04:00
Alex Leferry 2
ceb859271f
Add support for eRuby
...
http://www2a.biglobe.ne.jp/~seki/ruby/erb.html
2020-06-03 15:12:51 +02:00
Frank LENORMAND
61366fd1ef
rc man: Handle early window resize
...
If the window gets resized before the `man` command is called, the
hook will error out and display an error.
Fix #3432
2020-06-03 15:47:46 +03:00
Frank LENORMAND
24c5169400
src: Introduce a <percent> named key
...
Similarly to the <semicolon> key, make it easier to write
`:execute-keys` commands by replacing <percent> with `%`.
Highlighters can keep escaping the sign when regular expressions are
not quoted, but built-in scripts that use `%` as an editing primitive
have been modified to use the named key, for clarity.
2020-06-03 15:42:38 +03:00
Maxime Coste
d32d185d48
Merge remote-tracking branch 'pickfire/rust-doctests'
2020-06-02 18:44:53 +10:00
Maxime Coste
d43b6799cf
Merge remote-tracking branch 'pickfire/rust-dedent'
2020-06-02 18:40:09 +10:00
Ivan Tham
12cafe3ed4
Rust dedent { after where clause
2020-06-02 00:26:47 +08:00
Ivan Tham
b1beea8638
Rust indent after standalone where
2020-05-31 18:13:04 +08:00
Ivan Tham
de4b7f3864
Rust indent block comment
2020-05-31 18:07:17 +08:00
Ivan Tham
97c4cb243b
Highlight rust default keyword (specialization)
2020-05-31 17:49:43 +08:00
Ivan Tham
4ccb5fd315
Highlight doc tests in rust
...
Feels a big laggy when system overloaded
2020-05-31 11:47:47 +08:00
Alex Leferry 2
23a428c9af
Crystal: Slight style change
2020-05-30 23:10:22 +02:00
Michał Kruszewski
7661e67551
Fix python attributes highlight.
2020-05-30 16:47:32 +02:00
Ivan Tham
479790633b
Fix rust reference url
2020-05-30 19:23:55 +08:00
Ivan Tham
dd3257e3f2
Rust take indentation before comment to next line
2020-05-30 10:54:55 +08:00
Ivan Tham
7c791f130c
Handle dedent in rust syntax
...
Naively handle dedent after , and ; which works most of the cases but
does not work with multi level dedent.
2020-05-30 10:54:55 +08:00
Maxime Coste
321facb594
Merge remote-tracking branch 'Anfid/lua-fixes'
2020-05-30 09:29:48 +10:00
Maxime Coste
1a185f5d6f
Merge remote-tracking branch 'Phlogistique/eex'
2020-05-30 09:25:19 +10:00
Maxime Coste
3589791670
Merge remote-tracking branch 'Guest0x0/master'
2020-05-30 09:24:25 +10:00
Maxime Coste
d1f4b44655
Merge remote-tracking branch 'lenormf/fix-ini'
2020-05-30 09:22:37 +10:00
Maxime Coste
0b56c777c0
Merge remote-tracking branch 'lenormf/fix-spell-next'
2020-05-30 09:22:06 +10:00
Maxime Coste
f939055e22
Merge remote-tracking branch 'lenormf/remove-bold-italic-faces'
2020-05-30 09:21:08 +10:00
Maxime Coste
65921d0515
Merge branch 'fix-perl-regex' of https://github.com/buffet/kakoune
2020-05-30 09:20:00 +10:00
Maxime Coste
2a28779998
Merge branch 'latex' of http://github.com/mreppen/kakoune
2020-05-30 09:14:39 +10:00
Maxime Coste
3f787acb4f
Merge remote-tracking branch 'greenfork/add-underscores-to-zig-integers-highlighting'
2020-05-30 09:13:17 +10:00
Maxime Coste
0315b2e3f5
Merge remote-tracking branch 'greenfork/add-default-comments-for-zig'
2020-05-30 09:12:51 +10:00
Maxime Coste
a28deb0aaf
Merge branch 'highlight-markdown' of https://github.com/pickfire/kakoune
2020-05-30 09:11:45 +10:00
Maxime Coste
c716f5d4e4
Merge remote-tracking branch 'krobelus/02-sh-space-before-heredoc-keyword'
2020-05-30 09:07:20 +10:00
Maxime Coste
c8fde1bf33
Merge remote-tracking branch 'krobelus/01-fish-single-quote-highlighting'
2020-05-30 09:07:01 +10:00
Maxime Coste
d90f8d4324
Merge remote-tracking branch 'lenormf/remove-lint-enable'
2020-05-30 09:05:53 +10:00
Max Reppen
6f5bc42b87
LaTeX highlighter improvements
...
Added \(\) highlighter
2020-05-29 17:46:06 -04:00
Frank LENORMAND
b4f2c3fe91
rc lint: Remove the concept of "enabling" linting
...
This commit renames `lint-enable` into `lint-show-diagnostics`,
makes it hidden, and calls it automatically after diagnostics have
been recovered by `:lint-cleaned-selections`.
The `lint-disable` command becomes `lint-hide-diagnostics`.
The concept of "enabling" diagnostics was inherited from the Clang
support script, but in that case it's not clear why calling `:lint`
should do the work but not render it (similarly to `:spell`).
The `lint-show` command was also renamed into a more descriptive
`lint-show-current-line`.
2020-05-29 14:39:39 +03:00
Maxime Coste
08e0b663f7
Fix unintended interpretation of ranges length syntax
...
Ranges specified with a +<length> were inconsistent, with +0 meaning
an empty range, while +1 meant a two character long range (first character
+ the following one). Change that to mean a single character.
Fixes #3479
2020-05-29 12:25:57 +10:00
Johannes Altmanninger
62f61df08f
fish.kak: add new fish builtins
...
eval is a proper builtin as well now
2020-05-28 21:49:47 +02:00
Johannes Altmanninger
bb865a18c1
fish.kak: fix highlighting for single quoted strings
...
fish allows to escape single quotes within single quoted strings,
just like double quotes in double quoted strings.
https://fishshell.com/docs/current/index.html#quotes
2020-05-28 21:49:47 +02:00
Ivan Tham
752ccc0946
Fix regression on setext-style markdown header
...
Reproduce:
header1
header2
-------
2020-05-28 14:33:00 +08:00
Ivan Tham
09a45a2e96
Fix setext-style markdown header highlight
...
Reproduce:
- item
header
------
2020-05-27 18:23:53 +08:00
Dmitry Matveyev
31d41c526e
Add underscore highlighting as visual separator inside Zig integers
2020-05-22 16:47:05 +03:00
Johannes Altmanninger
53309c3534
sh.kak: allow space before heredoc string
2020-05-21 08:34:58 +02:00
Dmitry Matveyev
ccfd5ea5c6
Add default comments for Zig language
2020-05-19 22:05:10 +03:00
Maxime Coste
5933ab1e78
Split python auto-insert hooks from auto-indent
2020-05-19 17:16:05 +10:00
Frank LENORMAND
05db1e8697
rc spell: Make :spell-next
wrap around the buffer
2020-05-15 18:37:03 +03:00
Frank LENORMAND
4eac927a01
rc spell: Rewrite :spell-next
in Awk
2020-05-15 12:59:30 +03:00
Frank LENORMAND
e9e15e6a44
rc spell: Simplify selection-descriptions parsing
...
Remove everything after the first pipe sign. Pop the timestamp.
2020-05-15 12:21:02 +03:00
Frank LENORMAND
7db9062122
rc spell: Don't use expr
to format-check
...
The regular pattern based on `printf`/`grep` is cleaner and less
error prone.
2020-05-15 12:19:29 +03:00
Frank LENORMAND
37706d7a95
colors: Retire the bold
and italic
faces
...
This commit removes declarations and mentions to the built-in `bold`
and `italic` faces.
While they could be a user-friendly way of customising how tokens
are emphasised in Markdown documents (similarly to the
`$LESS_TERMCAP_*` environment variables for `man` pagers), most other
markup languages do not have the concept of "strong" and "emphasis"
but refer directly to the font style/weight.
The faces were also not even set by default to highlight as their
names implied, so having markup language support scripts directly
use the +b and +i face attributes is more consistent.
2020-05-15 11:56:38 +03:00
Frank LENORMAND
c7043e06ee
rc ini: More leniently highlight section names
...
Highlight every character between brackets, including more
brackets. This allows alternative constructs in INI files such as:
```
[section]
[[subsection]]
```
This commit also only applies the appropriate face on the section
name itself, not the entire line (including hypothetical surrounding
whitespace characters).
2020-05-14 10:25:38 +03:00
Frank LENORMAND
9bc6bddcac
rc spell: Fix off-by-one highlighting glitch
2020-05-07 10:40:25 +00:00
buffet
7870685248
Fix perl regex for operator //
2020-05-05 16:22:30 +00:00
Noé Rubinstein
c5bd4a37ee
Elixir: add support for Eex comments and quotation
2020-05-03 13:54:51 +02:00
Noé Rubinstein
da45172256
Elixir: add support for <% in addition to <%=
2020-05-03 13:54:50 +02:00
Noé Rubinstein
f272768544
Elixir: Fix triple-string, add support for Eex
...
This adds support for the Eex templating that is used in the Phoenix
web framework. Eex files include HTML and Elixir code, and Elixir files
can include Eex in string literals marked with the `~L` prefix.
Additionally this unbreaks `"""` string literals, which did not work because
`"` was matched before `"""`
2020-05-03 13:54:48 +02:00
Guest0x0
36d4cf4f5b
fix indent behavior for lines without indent
2020-05-03 17:48:44 +08:00
Frank LENORMAND
c6906be475
rc man: Make the use of $MANPATH
portable
2020-05-02 11:59:06 +10:00
Maxime Coste
83cdaee002
Merge remote-tracking branch 'JJK96/spell'
2020-04-30 19:23:27 +10:00
Maxime Coste
db8f19c51f
Merge remote-tracking branch 'eraserhd/fix-kitty'
2020-04-30 19:22:07 +10:00
Jason Felice
d287251326
Split modules and allow kitty-send-text to take a parameter
2020-04-27 11:58:39 -04:00
Jan-Jaap Korpershoek
063a702bf4
Add error handling
...
Rewrite line by line to make escaping easier
2020-04-27 12:28:29 +02:00
Jan-Jaap Korpershoek
246735520f
Add spell-add command
2020-04-27 11:57:14 +02:00
Maxime Coste
e69b369e6f
Merge remote-tracking branch 'ifreund/meson-syntax'
2020-04-27 17:40:45 +10:00
Guest0x0
69e45dce38
basic syntax highlighting & indentation for the Coq language
2020-04-23 21:07:37 +08:00
Maxime Coste
f7ad8bd70e
Highlight mail References headers
2020-04-21 13:21:35 +10:00
Maxime Coste
6dc17cb3b3
Complete man pages from MANPATH as well
2020-04-21 13:21:35 +10:00
Isaac Freund
b0fb7fce63
Highlight meson_options.txt as well
2020-04-15 02:49:21 +02:00
Isaac Freund
8ad6746cc8
Add basic highlighting for meson
2020-04-15 01:04:44 +02:00
Maxime Coste
fd454f90f9
Merge remote-tracking branch 'ifreund/zig-syntax'
2020-04-13 11:08:32 +10:00
Maxime Coste
52a80defd6
Merge remote-tracking branch 'Laaas/patch-1'
2020-04-13 11:07:09 +10:00
Maxime Coste
54e0396c84
Merge remote-tracking branch 'codesoap/awkcomment'
2020-04-09 07:50:11 +10:00
Maxime Coste
b3983dd523
Merge remote-tracking branch 'eraserhd/diff-objects'
2020-04-09 07:42:01 +10:00
Maxime Coste
63df04b6e0
Merge remote-tracking branch 'lenormf/fix-lint'
2020-04-09 07:41:54 +10:00
Aaron Bull Schaefer
de2b3f9b9a
Add filetype support for CUE language
...
This follows the upstream spec as closely as possible.
See:
- https://cuelang.org
- https://cuelang.org/docs/references/spec/
2020-04-06 12:03:54 -07:00
Jason Felice
7e5936ba23
diff.kak: add diff file and diff hunk text objects
2020-04-03 15:48:54 -04:00
Frank LENORMAND
7d987c013e
rc lint: Check the lintcmd
option is set in :lint-buffer
...
Calling `:lint-buffer` when `lintcmd` is empty results in a temporary
directory being created, but never removed when the underlying linting
code errors out.
2020-03-27 10:20:40 +03:00
Las
e142a37f21
rc ruby: Don't recognize "keyword"-like identifiers
...
In Ruby, identifiers can end with a `!` or `?` too, which means that `class!` or `end?`are not actually keywords, but regular identifiers. This fixes that by not using `\b` but `[^0-9A-Za-z_!?]` instead in some places.
2020-03-25 21:18:21 +09:00
Isaac Freund
9396f508c2
Fix indentation of auto-extended comments
2020-03-22 20:19:43 +01:00
Isaac Freund
6198cc5e47
Encapsulate zig highlighting and commands in a module
2020-03-22 19:24:39 +01:00
Isaac Freund
3098557e25
Add indent rules
2020-03-22 19:18:15 +01:00
Isaac Freund
23b28df1b8
Use attribute face where appropriate
2020-03-22 10:50:29 +01:00
codesoap
94cdd3f9e3
rc spell: Avoid C-style comments in awk
2020-03-22 08:13:30 +01:00
Isaac Freund
6190f8ce70
Add syntax highlighting for zig
2020-03-21 22:46:19 +01:00
Mikhail Pogretskiy
57c62b2a10
rc lua: Improve indent hooks behavior, add '...' highlighting
2020-03-20 23:12:46 +07:00
Maxime Coste
329f291ae0
Merge remote-tracking branch 'Anfid/hunk-seek-wrap'
2020-03-15 12:35:50 +11:00
Mikhail Pogretskiy
8c7bb10e56
rc git: Make git next/prev-hunk behavior consistent with search command
2020-03-11 13:56:28 +07:00
Frank LENORMAND
e83ad2a2a4
rc spell: Re-implement message processing in Awk
...
Plain shell takes too long on large files.
Fixes #3399
2020-03-09 14:22:34 +03:00
Maxime Coste
f682d8c01f
Merge remote-tracking branch 'chambln/git'
2020-03-03 07:55:12 +11:00
Jason Felice
1ed8b84762
Fix unnecessary refreshes
...
Incrementally setting the lint variables triggers multiple refreshes,
including the text jumping as the guttter column is removed and re-
added. This causes the info message to disappear when linting is done
on NormalIdle.
2020-02-28 21:44:10 -05:00
Gregory Chamberlain
13d042cf8f
rc git: Fix highlighting of ‘:git log --graph’
...
Looks like hyphens and periods are sometimes printed as part of
git-log(1)’s graphing feature; for example, in this repository:
git log --graph 55e7f857
2020-02-27 05:11:11 +00:00
Maxime Coste
f6b6b94ba6
Merge branch 'rust-indent' of http://github.com/jneem/kakoune
2020-02-25 20:13:30 +11:00
Maxime Coste
a2506f3b22
Merge remote-tracking branch 'matthias-margush/file-type-detection-fix'
2020-02-25 20:12:22 +11:00
Joe Neeman
5024fe17f6
Make rust auto-indenter ignore most things inside comments.
...
Fixes #3352 .
2020-02-24 12:51:03 -06:00
Matthias Margush
99c09daec3
Fix filetype detection
...
The -i flag on Mac OS means:
჻ man file | grep -i -- -i
-i If the file is a regular file, do not classify its contents.
The --mime-type option is (mostly) portable:
- Linux uses --mime-type
- macOS uses --mime-type
- FreeBSD uses --mime-type
- NetBSD uses --mime-type
- OpenBSD uses --mime-type and does not use the same implementation as everybody else
- Solaris does not support MIME types at all
2020-02-21 21:25:57 -08:00
Gregory Chamberlain
7babfe2508
Use filetype ini for XDG desktop entry files
...
See <https://freedesktop.org/wiki/Specifications/desktop-entry-spec/ >
2020-02-20 18:25:01 +00:00
Maxime Coste
ce93a7b032
Fix doc paragraph rewrapping
2020-02-18 19:25:12 +11:00
Maxime Coste
61cae51605
Merge remote-tracking branch 'Guest0x0/master'
2020-02-16 10:48:04 +11:00
Maxime Coste
08d6268ae7
Merge remote-tracking branch 'lenormf/documentation-face'
2020-02-16 10:46:35 +11:00
Tim Allen
9277121695
rc lint: Change flag symbols for lint errors and warnings.
...
As suggested in code review.
2020-02-14 17:27:36 +11:00
Guest0x0
ab091bcf69
improve syntax highlighting
2020-02-14 07:33:47 +08:00
Tim Allen
59e273c316
rc lint: Teach lint-{next,previous}-message to wrap around the buffer.
...
This matches the behaviour of make-{next,previous}-error.
2020-02-13 20:27:28 +11:00
Tim Allen
48bd7387bb
rc lint: When parsing lint messages, use "remove shortest prefix" pattern.
...
There might legitimately be "|" characters in the message, so
we want to stop at the first one, the one that delimits the message location
from the message text.
2020-02-13 20:27:24 +11:00
Tim Allen
cad0572ca5
rc lint: Re-add missing kakquote functions.
2020-02-13 20:27:19 +11:00
Tim Allen
c1e9f46301
rc lint: Don't start a comment with "shellcheck".
...
That confuses shellcheck into expecting a warning pragma.
2020-02-13 20:27:12 +11:00
Tim Allen
09f067d585
rc lint: More code-review comments.
...
Don't ask Kakoune to quote values we know can never contain shell-sensitive
characters, and flatten the kakquote() function to a single line for ease
of copy/pasting.
2020-02-09 14:01:35 +11:00
Tim Allen
673d081823
rc lint: Address code-review comments.
2020-02-09 13:23:58 +11:00
Tim Allen
51fcea7ce0
rc lint: Add a lint-selections command to lint part of a buffer.
...
Fixes #2302 , #3336 .
Addresses parts of #3155 .
Changes include:
- New `lint-selections` command that only lints the current selections,
and allows a custom lint command.
- New `lint-buffer` command that always lints the whole buffer with
the linter specified in the lintcmd option.
- `lint` alias for `lint-buffer`, for backwards compatibility.
- Errors and warnings are now shown in the Error and Information faces,
not hard-coded red and yellow.
- Error and warning flags now use "!" and "?" symbols respectively,
instead of a unicode block, so they can still be distinguished
in a monochrome colour-scheme or by colour-blind users.
- An error flag on a given line always takes precedence over a warning.
- All messages for the same line are collected into a multi-line message.
- We no longer escape tildes in messages, since that change was added
in commit ae339dc
(2016) when we started using `%~~` to quote messages.
We stopped using `%~~` in commit 1a2eecd
(2018).
- Anything the linter writes to stderr is logged to the *debug* buffer,
not lost.
- If the linter writes to stderr, an error is shown to the user instead
of the usual error/warning count.
- The `lint_errors` hidden option is replaced by `lint_messages`,
because it contains warnings as well as errors.
- `lint-next-error` renamed to `lint-next-message`,
and `lint-previous-error` renamed to `lint-previous-message`
for the same reason.
- New `lint-next-error` and `lint-previous-error` aliases,
for backwards compatibility.
- `lint-next-message` and `lint-previous-message` show the message
they jump to.
- Where `lint_errors` was a range-specs option, `lint_messages` is a
line-specs option to keep things simpler. This means lint-next-message
and lint-previous-message no longer jump to a specific column.
2020-02-07 19:22:47 +11:00
Maxime Coste
8eb84c6f5d
Merge branch 'master' of http://github.com/velrest/kakoune
2020-02-07 07:03:33 +11:00
Dan Rosén
8dd2373db1
Remove duplicated scopes highlight in kakrc.kak
2020-02-06 17:33:16 +01:00
Maxime Coste
bb28477c48
Merge remote-tracking branch 'chambln/master'
2020-02-05 20:54:49 +11:00