Commit Graph

2308 Commits

Author SHA1 Message Date
c piapiac
bdd7a956f3
rc zig: auto-insert multiline string prefix on newline 2021-06-12 03:38:27 -07:00
c piapiac
73910efce8
rc zig: 0.8.0 language changes
* adds nosuspend keyword
* adds @extern builtin
* removes @TagType builtin
2021-06-12 03:26:32 -07:00
Gadzhi Kharkharov
4f51130fc9 rc: add gdscript.kak 2021-06-06 14:08:13 +03:00
Dmitry Matveyev
2f22fef5bd Rename exec->execute-keys for consistency 2021-06-06 14:29:51 +06:00
Dmitry Matveyev
a65501a1d9 Rename exec->execute-keys for consistency 2021-06-06 14:28:28 +06:00
Dmitry Matveyev
0b1654b0cf Better comment inserting tests and fix implementation 2021-06-06 14:13:34 +06:00
Dmitry Matveyev
167cffb3da Better comment inserting tests and fix implementation 2021-06-06 14:08:40 +06:00
Dmitry Matveyev
8867e40929 Fix elixir copying comment # sign
Elixir uses # for comments, not --.
Implementation is copied from Nim.
2021-06-06 01:32:56 +06:00
Dmitry Matveyev
0f49e7375e Add auto-inserting of "end" keyword to Elixir
fixup! Add auto-inserting of "end" keyword to Elixir
2021-06-06 01:32:53 +06:00
Dmitry Matveyev
fcc04384d1 Fix Ruby <ret> mid-comment
Implementation is copied from Nim.
2021-06-06 00:38:36 +06:00
Dmitry Matveyev
02e625e8fb Remove electric behavior for end keyword
Correctly indentint on "end" keyword seems very hard,
it is simpler to remove it. And we already insert "end"
in ruby-insert-on-new-line hook, so the removal shouldn't
hurt too much.
2021-06-06 00:30:50 +06:00
Girish Kumar
95d224a21d fix: iterm focus client from different tab or window
currently focus client doesn't work if target pane of the client is in different tab or window from current one.
select window, select tab should be triggered in order to select a pane on a currently not focused tab or window.
2021-06-02 12:05:03 +05:30
Răzvan C. Rădulescu
c24cbebe47 Fix purescript comments and keywords 2021-05-30 15:39:58 +03:00
Maxime Coste
d758bbf09b Merge remote-tracking branch 'yerlaser/patch-1' 2021-05-28 20:55:25 +10:00
Maxime Coste
b37a282845 Merge remote-tracking branch 'yerlaser/patch-2' 2021-05-28 20:53:18 +10:00
raingloom
51c9811c7a add sps and sls file extensions for scheme
These extensions are the ones used automatically by the Akku package
manager when generating a new package, so they should probably be
added.
2021-05-28 20:51:06 +10:00
Taupiqueur
5ba51b377a Fix eRuby detection 2021-05-24 13:18:50 +02:00
Yerlan
48a07888de
Fixing strings in Dart
1. Deleted back-tick strings which are not a valid Dart syntax
2. Added string interpolation for ${}
3. NOT adding string interpolation for $var as this is considered a bad practice
2021-05-19 22:44:27 +02:00
Yerlan
a390a6f356
Highlight extra chars in literal
This commit adds highlighting characters other than the first with red color helping to get immediate feedback of the syntax error.
This helps those who come from languagles like JS where single quotes also denote multi-character strings.
2021-05-18 20:51:52 +02:00
Maxime Coste
38f85706ff Merge remote-tracking branch 'danr/jedi' 2021-05-18 21:06:28 +10:00
Maxime Coste
67e5ecc816 Merge branch 'perl_allow_strref' of http://github.com/fennewald/kakoune 2021-05-18 21:05:35 +10:00
Maxime Coste
db24a78e2c Merge remote-tracking branch 'dead10ck/fix-rust-solarized' 2021-05-18 21:02:10 +10:00
Maxime Coste
b9c02091a7 Merge remote-tracking branch 'hristost/hristost/swift-extension-keyword' 2021-05-18 21:01:14 +10:00
Yerlan
0dcbf52216
Java: add highlighting for char literal 2021-05-17 21:15:30 +02:00
Yerlan
c483d65594
Simplifying regex
As suggested by @krobelus.
However, I figured that highlighting characters as strings is not correct as they are more like values.
2021-05-17 20:54:29 +02:00
Yerlan
c7f7e01bba
Kotlin: string interpolation and character literal
Adding highlighting for string interpolation inside double-quoted strings and character literals inside single-quotes.

Avoiding string interpolation in the form of $var as this is considered bad practice.
2021-05-17 20:45:48 +02:00
fennewald
eb205cf3c2 Allowed for references of strings 2021-05-17 14:30:33 -04:00
Yerlan
dff23f2f3f
Kotlin: Add highlight for character literals 2021-05-17 18:44:10 +02:00
hss
92800c07ef rc swift: highlight "extension" and "fileprivate" keywords 2021-05-13 23:44:22 -04:00
Dan Rosén
6198ebe37d Fix jedi off-by-one and refactor jedi
The off-by-one was introduced by cd9b1e66 which changed `column-1` to `column`.

The refactoring solves some esoteric quoting errors: I think cases like
unbalanced braces in the bufname and client were not supported.
2021-05-04 20:57:13 +02:00
Skyler Hawthorne
fb04102fe3 add TODO comment highlighting 2021-05-02 20:38:42 -04:00
Markus F.X.J. Oberhumer
c4c093d764 doc: small UX improvements.
Place the cursor at the beginning of the file (and not at
the end of the first line) and improve error message in
case of failure.
2021-05-02 11:27:48 +02:00
Maxime Coste
7090be59df Merge remote-tracking branch 'occivink/c-family-quote-variable' 2021-05-01 14:42:03 +10:00
Skyler Hawthorne
a25ef2bd6d fix rust pub highlight 2021-05-01 00:35:56 -04:00
Olivier Perret
0bcbcef7dc c-family.kak: properly quote shell variable
This will fail with filenames with spaces otherwise
2021-04-30 11:53:18 +02:00
Michał Kruszewski
b8aae26586 [VHDL] Add 'character' to types highlight. 2021-04-29 13:38:15 +02:00
Maxime Coste
f09844c7e5 Merge remote-tracking branch 'dead10ck/fix-rust-solarized' 2021-04-29 21:04:39 +10:00
Maxime Coste
5467a8eada Merge remote-tracking branch 'yerlaser/master' 2021-04-29 21:04:04 +10:00
Skyler Hawthorne
488798d977 improve colors for rust/solarized
* bring colors more aligned with upstream solarized implementations
  (e.g. vim, emacs)
* tweak rust syntax
    * add more details, like operators, highlighting certain traits and
      types from std, etc
    * remove certain highlighters, like user types. This has the effect
      of just highlighting almost the whole code base one color, and
      wasn't really correct either. CamelCase for types is only convention
2021-04-28 21:27:43 -04:00
Yerlan
0f99fb53bc
Removing more kotlin_ prefix
Done. Please review again :)
2021-04-28 19:07:32 +02:00
Taupiqueur
f65fbd1a2d Ruby: Add require_relative keyword 2021-04-28 14:25:51 +02:00
Maxime Coste
3b147bca0a Merge branch 'patch-1' of https://github.com/dzamo/kakoune 2021-04-28 08:14:52 +10:00
Yerlan
381cc1dec3
Addressing comments by mawww
Done. Thanks!
2021-04-27 19:52:15 +02:00
dzamo
cd9b1e66f0
Update jedi.kak
I needed this patch accommodating minor Jedi API changes to get Jedi completion working.  I've got Jedi 0.18.0.
2021-04-27 17:42:29 +02:00
Taupiqueur
afc30a8940 Markdown: Add Crystal
https://crystal-lang.org
2021-04-26 22:06:48 +02:00
Yerlan
d7d160757a
Kotlin.kak new attempt
Updates to address these comments:
"I still dont quite see why we need to introduce all those options, especially with names that dont say anything about kotlin. I would expect a single kotlin_static_words option to be enough.
Similarly, a single highlighter should be enough here."
2021-04-26 19:29:22 +02:00
Markus F.X.J. Oberhumer
2b3e5bc972 rc doc: do not require arguments for ":doc" or ":help"
When no arguments are given simply run ":doc doc".
2021-04-26 00:13:01 +02:00
Maxime Coste
40270a9c8b Merge remote-tracking branch 'Eluminae/master' 2021-04-25 20:23:10 +10:00
eli
453cb7f367 Fix issue with tmux.kak setting empty TMPDIR variable 2021-04-24 17:59:13 +01:00
Gustavo Henrique Montesião de Sousa
2454cf3345 Add basic support for the Janet language 2021-04-23 14:49:24 -03:00
Maxime Coste
e973991c49 Merge remote-tracking branch 'SolitudeSF/suffix' 2021-04-18 17:07:30 +10:00
Maxime Coste
732ee04c84 Merge branch 'better_headerguards' of http://github.com/fennewald/kakoune 2021-04-18 17:04:40 +10:00
Johannes Altmanninger
0a9c90fecf rc: use a separate *-insert hook to auto-insert comments
This should cover all filetypes that already auto-insert comments,
except for rust.kak, which is left for a follow-up.

Most of these are straightforward, some explanation for special cases:

rc/filetype/zig.kak rc/filetype/cue.kak

  These indent hooks used their own logic to indent after "{" only if
  no comment was inserted. Replace this logic by checking if a comment
  was inserted. This works because these "*-insert" hooks are run
  before their respective "*-indent" hooks.
 
rc/filetype/php.kak

  This also has some logic to insert "*" after "/*" lines. Basic
  usage seems to work still. In future this should borrow from the
  c-family one, which works a bit better.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
0264c84742 rc: when auto-inserting comments, include trailing spaces from previous line
We already do this in most places.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
eb3beff959 rc: make insertion hooks more consistent 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
3ab2b98ec3 rc: remove spurious tabs
This makes it easier to be consistent.

Also replace "<<-EOF" by "<<EOF", since the former only does trims
tabs, not spaces.
2021-04-17 20:56:23 +02:00
Johannes Altmanninger
787ff5d002 rc sass: highlight and copy full comments, and support CSS comments 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
9fadda0df4 rc nim: follow our convention 2021-04-17 20:56:23 +02:00
Johannes Altmanninger
997059fed1 rc javascript: fix line comment prefix 2021-04-17 20:56:23 +02:00
Maxime Coste
5696ed02e4 Fix invalid insertion of ; after } closing some functions
Function taking a parameter with a struct tag on the last line
before the opening { were wrongly treated as structs. Add some
additional regex logic to try to catch those cases.

Fixes #4136
2021-04-08 20:14:02 +10:00
Maxime Coste
abf68320fa Merge remote-tracking branch 'c7skasku/d-nested-block-comments' 2021-04-07 20:08:21 +10:00
Cormac Stephenson
710f121a54 d.kak: highlight nested block comments recursively
https://dlang.org/spec/lex.html#comment
2021-04-06 13:45:04 +01:00
SeerLite
3397737b16 rc markdown: Fix code fence regex
The invalid regex `)\b` currently matches anything, so this didn't cause
any errors.
It is still invalid though, so I fixed it by moving the `\b` to the end
of the non-raw_attribute language name (like the original regex). The
raw_attribute one shouldn't need this because the `}` marks the end of
the language name anyway.

Fixes #4025
2021-04-01 22:53:44 -03:00
SeerLite
e84dd80244 rc markdown: Fix trailing whitespace removal
Modified the test cases accordingly too
2021-04-01 22:27:30 -03:00
SeerLite
5c03e2bd54 rc markdown: Add -insert hook 2021-04-01 22:22:08 -03:00
Carson Riker
b98ec3836b Stripped directory prefix from c-family autogenerated header guards 2021-03-31 17:33:04 -04:00
Maxime Coste
212242cc60 Slight cleanup of the c-family highlighters
* Extract raw strings to the C++ specific section
* Merge different documetnation comment formats in single regions
2021-03-31 21:24:45 +11:00
SolitudeSF
fe66b8a390
rc nim: update suffix spec 2021-03-24 17:11:26 +02:00
Maxime Coste
c507863a00 Merge remote-tracking branch 'Eluminae/wayland' 2021-03-23 21:50:27 +11:00
Maxime Coste
d8fbe3105d Merge branch 'lua-auto-indent-improvement' of http://github.com/cipharius/kakoune 2021-03-23 19:57:46 +11:00
cipharius
78a0b5e4c7 Improves Lua auto indent and end insertion
Current solution makes it difficult to use common Lua practices of having one-liner if statements and using anonymous functions.
New solution prevents auto-indentation and end insertion, if the previous line contains an "end" keyword.
It does not attempt to match each structure with corresponding end, since using multiple end keywords in single line is a very rare occurance in Lua.
2021-03-23 10:36:05 +02:00
Reed Wade
feab20260a
Permit usage on wayland environments.
Some wayland wm will not setup a DISPLAY environment variable. Kakoune
should allow x11 windowing toolkit for those wm also.
2021-03-21 13:41:40 +01:00
Lennard Hofmann
8d24041c1a rc markdown: Fix HTML highlighting in inline code
Because the HTML highlighter was higher up in the hierarchy than the code
highlighter, it took precedence. I fixed it by making it an inline region.
Using my new knowledge of "inline" I was able to remove one line of code.

Fixes #4091
2021-03-21 09:52:00 +01:00
SeerLite
c0e8dceb5d js: Highlight special variables at start of file 2021-03-17 23:59:05 -03:00
Maxime Coste
7f8f748d06 Merge remote-tracking branch 'basbebe/kitty_command' 2021-03-11 20:41:30 +11:00
basbebe
1183e716bc
make kitty repl command consistent with other kitty commands 2021-03-11 10:40:14 +01:00
basbebe
8d5d0d7d90
use kitty launch command, make commands consistent
`new-window` is a legacy command (see https://github.com/kovidgoyal/kitty/issues/2708).
`KITTY_WINDOW_ID` should be set for any kitty window anyways.
2021-03-11 10:36:30 +01:00
Maxime Coste
c12d1c16b7 Merge remote-tracking branch 'hristost/hristost/swift-multiline-strings' 2021-03-11 08:02:53 +11:00
Maxime Coste
835eaf5495 Merge remote-tracking branch 'pickfire/rust-indent' 2021-03-11 07:51:08 +11:00
hss
566143ac6d rc swift: highlight multiline strings 2021-03-07 21:26:31 -05:00
Ivan Tham
ebe7f82bb2 Support rust visibility for enum and others 2021-03-07 14:22:43 +08:00
Ivan Tham
8df5621334 Support dedent with rust fn qualifiers 2021-03-07 14:12:01 +08:00
Maxime Coste
60c44e1623 Merge remote-tracking branch 'andreyorst/fennel-filetype' 2021-03-02 21:13:25 +11:00
Andrey Listopadov
877cc9cf88 add fennel filetype 2021-03-01 19:51:36 +03:00
Maxime Coste
bdee3abd88 Match on kitty window id when available
This ensures new window are created in the same os window as the
current client instead of the default one.

Closes #4009
2021-03-01 08:47:09 +11:00
Maxime Coste
ca5e6f835c Merge remote-tracking branch 'gf3/graphql-syntax' 2021-03-01 08:27:36 +11:00
Maxime Coste
a0f567f5e6 Merge remote-tracking branch 'm-kru/troff_comment' 2021-03-01 08:26:02 +11:00
Isa Cichon
0fc91b9576 Fix usages of ModeChange hook
hook param always begins with either push: or pop:

Fixes #4078
2021-02-28 21:07:21 +01:00
Michał Kruszewski
b7def7350c Add comment highlighter for troff files.
Add comment highlighter for troff files.
Also highlight the end of the macro definition.
2021-02-25 20:18:10 +01:00
Maxime Coste
726b96da69 Merge remote-tracking branch 'forbesmyester/master' 2021-02-25 20:24:54 +11:00
Maxime Coste
70548ecc14 Merge remote-tracking branch 'rwpeterson/juliahl' 2021-02-25 20:23:10 +11:00
Maxime Coste
84211d2b60 Merge branch 'add-comment-chars-for-scheme' of https://github.com/Calum-J-I/kakoune 2021-02-25 20:22:02 +11:00
Maxime Coste
475e1ccf28 Merge commit 'refs/pull/4047/head' of https://github.com/mawww/kakoune 2021-02-25 20:20:25 +11:00
Bob Peterson
c457c2b1c1 rc julia: add multiline comments 2021-02-21 19:20:03 +01:00
Calum
3e456ae34e use lisp comments for scheme 2021-02-22 01:21:04 +13:00
Ivan Tham
4e594e034a Dedent rust await function with ? 2021-02-17 01:17:17 +08:00
Ivan Tham
049591f6b4 Dedent rust empty match 2021-02-17 01:17:14 +08:00
Maxime Coste
dea44e4964 Merge remote-tracking branch 'lenormf/fix-spell' 2021-02-11 20:40:50 +11:00
Maxime Coste
fb30d3751c Merge remote-tracking branch 'krobelus/yaml-comment' 2021-02-11 20:30:34 +11:00
Maxime Coste
1440db3f89 Merge remote-tracking branch 'krobelus/rest-leaked-code-highlighting' 2021-02-11 20:29:43 +11:00