Maxime Coste
d49555fc75
Move highlighters into Scopes
...
That means we can now have highlighters active at global, buffer, and
window scope. The add-highlighter and remove-highlighter syntax changed
to take the parent path (scope/group/...) as a mandatory argument,
superseeding the previous -group switch.
2017-10-28 13:43:04 +08:00
Maxime Coste
7dc800c213
Simplify lookaround use in moon.kak
...
(?=[A-Z]\w*) is strictly the same as (?=[A-Z]) as \w* will always
at least match an empty string.
2017-10-25 10:29:11 +08:00
Maxime Coste
0fa59e5fd2
rc/: Tweak some regexes to be compatible with our impl limitations
...
The upcoming custom implementation does not support arbitrary lookarounds,
and other advanced regex features. Simplify the regexes to avoid those.
2017-10-25 10:27:39 +08:00
Maxime Coste
bf6e5daa08
Use stricter regex syntax
...
boost regex tolerates non-escaped special characters, and escaped
non-special characters. Standardize on stricter syntax, where
special characters must be escaped, and non-special characters must
not.
2017-10-25 10:27:39 +08:00
Maxime Coste
80d661e6a7
rc/: More consistent uses of regex syntax
...
Always use \A \z for subject start/end, always \b for word boundaries
2017-10-25 10:27:25 +08:00
Nicholas Ochiel
d168c75002
vim modeline regex should accept not one but "at least one" whitespace.
2017-10-21 21:04:39 +03:00
Dan Rosén
1310193a0a
Fix typescript highlighter
...
Before this patch keywords are highlighted in comments etc
2017-10-21 09:56:38 +02:00
wheatdog
6f6e76a245
Fix latex.kak
...
Solve #1346
2017-10-17 21:14:08 +08:00
Maxime Coste
209113aa1c
Merge remote-tracking branch 'nochiel/nochiel-fix-autorestore'
2017-10-17 10:30:24 +08:00
Maxime Coste
431e226fc8
Merge remote-tracking branch 'danr/Add-support-for-typescript'
2017-10-15 22:51:44 +08:00
Nicholas Ochiel
24e9b86562
ref vim options.txt
2017-10-15 06:04:19 +03:00
Alex Suraci
c702c915c1
iterm: use 'exec' so pane auto-closes with editor
...
this uses 'export' to set $TMPDIR instead; fish provides an 'export'
function for bash-compatibility, so this should work for both shells.
note that prior to this change, opening new panes with fish did not
work, as fish does not support `FOO=1 bar` syntax.
2017-10-13 16:01:06 -04:00
Nicholas Ochiel
040a096f36
Do not restore old backup files. This check is necessary for cases where
...
- the file was edited with a different editor/program or
- kak didn't restore a backup or
- if old backups weren't purged or
- if autorestore wasn't loaded (e.g. `kak -n`) after backups were generated.
2017-10-12 15:33:21 +03:00
Dan Rosén
ad724ab1a8
Add support for typescript
2017-10-10 10:23:25 +02:00
Maxime Coste
397e5ef0e1
Fix potential bug in clang.kak
2017-10-10 10:53:12 +08:00
Nicholas Ochiel
755cbd4436
Fix: glob for backup files.
2017-09-27 00:34:05 +03:00
Philippe Daouadi
f56c5d687e
Check for gocode, goimports and gogetdoc on go-tools loading
2017-08-30 10:19:13 +02:00
Maxime Coste
c8335a6515
Merge remote-tracking branch 'blastrock/go-tools-error'
2017-08-26 10:47:04 +07:00
Enrico Lumetti
59e5a4126d
editorconfig.kak: fix awk typo
2017-08-23 21:11:46 +02:00
Philippe Daouadi
9fafb1aba1
Show error when using go-jump and jq is not installed
2017-08-21 10:02:47 +02:00
Maxime Coste
9c4448ac41
Remove echo -color
support, superseeded by echo -markup
...
`echo -color Error "blah"` is the same as `echo -markup '{Error}blah'`
Fixes #1512
2017-07-19 17:18:52 +02:00
Frank LENORMAND
a2be15801f
rc tupfile: Fix the keywords regex
2017-06-29 13:13:01 +03:00
Frank LENORMAND
cb9a2e562b
rc: Fix calls to mktemp
...
The GNU and BSD implementations differ on several points, this commit
hopefully finds a middle ground.
2017-06-16 11:51:46 +03:00
Frank LENORMAND
d113d5232a
rc jedi: Don't create an unused debug/log file
2017-06-09 14:30:58 +03:00
Frank LENORMAND
813d09a101
rc: Fix calls to mktemp
...
Allow `mktemp` to make use of the `TMPDIR` environment variable when
calling it with a template.
Don't use the deprecated `-t` flag.
2017-06-09 14:30:54 +03:00
Maxime Coste
26298e8f7b
Use a line-specs for the clang_errors option in clang.kak
...
That way, we can have it updated when the buffer changes, and get
diagnostics on the correct lines.
2017-05-25 19:54:08 +01:00
Maxime Coste
c4db46b58b
Rename line-flags option type to line-specs
...
Generalize this option type, which is a timestamped list of
<line number>|<arbitrary string>. That way this type is not strongly
coupled with the flag-lines highlighter, and can be reused for other
use cases.
2017-05-24 15:41:43 +01:00
Frank LENORMAND
b9cdccd53a
rc: Document non-hidden options with -docstring
2017-05-16 14:35:43 +03:00
Vincent Siliakus
812af8c886
Use only default faces
2017-05-11 18:40:07 +02:00
Vincent Siliakus
848de57f20
Add Elixir highlighter
2017-05-06 08:19:57 +02:00
Frank LENORMAND
9f62c1a552
rc: Use $SHELL instead of spawning bash
arbitrarily
2017-04-30 13:38:32 +03:00
Frank LENORMAND
a244c10167
rc: Forward $TMPDIR to iterm
subprocesses
2017-04-10 22:17:59 +03:00
Alex Leferry 2
08c4fac07f
rc/ranger: use $kak_hook_param_capture_N
2017-04-01 22:46:31 +02:00
Maxime Coste
a0b42323ed
Add a -debug flag to :edit to set the buffer as debug data
...
As for the *debug* buffer, buffers with the debug flag wont get
used for cycling through buffer, or word completion.
2017-03-08 19:33:25 +00:00
Martin Chaine
b5a9979bfb
also handle enums explicitly
2017-03-07 09:55:22 +01:00
Martin Chaine
b5f6a9b227
escape pipe from closure in the description
2017-03-06 22:30:59 +01:00
Maxime Coste
bdb3da6b36
Merge remote-tracking branch 'casimir/patch-1'
2017-03-03 21:33:20 +00:00
Martin Chaine
d232064a0b
add racer completion for rust
2017-03-01 13:11:35 +01:00
Frank LENORMAND
0fd41540d1
rc: Don't print errors when no buffer backup exist
2017-03-01 14:55:29 +03:00
Maxime Coste
72bea292f8
Merge remote-tracking branch 'lenormf/fix-autorestore'
2017-02-27 20:15:25 +00:00
Frank LENORMAND
5f5706eda3
rc: POSIXify the modeline.kak
script
...
Fixes #893
2017-02-26 10:27:56 +03:00
Frank LENORMAND
c379c5cbdc
rc: Simplify/POSIXify the autorestore.kak
script
...
This commit allows buffers that were not previously written to disk to
be restored if a backup has been generated in their name. Consequently,
we got rid of a few non-POSIX calls to `find` (using `-maxdepth` or
`-delete`), and of the logic that detected the newest backup (which
didn't seem a good reason enough to steer away from a portable command).
Fixes #1236
2017-02-24 14:48:49 +03:00
Maxime Coste
186eed0906
jedi.kak: python 3 compat fix
2017-02-20 20:13:48 +00:00
Maxime Coste
edc2a88643
Rename BufNew and BufOpen hooks to BufNewFile and BufOpenFile
...
Fixes #1225
2017-02-19 13:08:06 +00:00
Maxime Coste
b456de78a7
pony.kak: Remove redundant BufNew/BufOpen hooks
...
BufCreate will be called in any case.
2017-02-19 13:04:19 +00:00
Maxime Coste
55bd3b7949
Merge remote-tracking branch 'tmiller/add-elm-support'
2017-02-13 20:28:29 +00:00
Tom Miller
ec77784d98
Add elm language support
...
Using Haskell's language file as a starting point this add support for
Elm.
2017-02-13 07:52:01 -06:00
Nick Mosher
e1927fa9c4
Adds faces module and function. Renames identifier face to variable.
2017-02-09 21:43:29 -05:00
Alex Leferry 2
1fecb99a4d
support in-line comments
2017-02-01 13:56:24 +01:00
Maxime Coste
159c143757
Fix autorestore script when we have multiple restore files
2017-01-30 00:10:31 +00:00
Mathieu Gagnon
ee9482d90d
Add octothorpe to php comment highlighters
2017-01-29 06:28:28 -05:00
lisael
eeedd4854c
Cleanups and added :$
as autoindent trigger
2017-01-20 13:51:25 +01:00
lisael
ffdab1aeb3
added https://github.com/ponylang/ponyc filetype
2017-01-20 04:57:13 +01:00
Maxime Coste
ec618357de
Fix modeline.kak declaring the same command twice
2017-01-14 14:47:57 +00:00
Maxime Coste
5ad4499503
Fix naming conventions in bundled scripts
...
Do not use _ prefix for hidden commands, use - as a word separator
in command names.
2017-01-13 01:00:43 +00:00
Maxime Coste
91a56c11fe
Various auto indent fixes regarding wrong use of x instead of <a-x>
2017-01-13 00:50:03 +00:00
Maxime Coste
5989903e7c
Copy comments *before* copying indentation
...
Fixes #1118
2017-01-11 13:56:48 +00:00
Maxime Coste
343df600cb
Merge remote-tracking branch 'alexherbo2/command-names'
2017-01-10 13:44:11 +00:00
Matt Schick
e1833801f8
Change html highlighting to be ref inside of hbs highlighting
2017-01-08 17:29:36 -08:00
Maxime Coste
60d0813704
Tweak clang menu highlight so that we dont separate backspace from the escaped char
2017-01-04 12:23:25 +00:00
Alex Leferry 2
671b50bb52
update command names
2017-01-04 13:04:27 +01:00
Maxime Coste
5763cbb927
Merge branch 'add-handlebars-syntax-highlighters' of git://github.com/haarts/kakoune
2017-01-03 10:31:44 +00:00
Martin Chaine
d6bde05d27
don't handle trailing newline option
...
kakoune handles files as a list of lines with a newline ending
2017-01-01 19:19:40 +01:00
Martin Chaine
45fb4b6bac
allow to override filename + remove existing hooks
2016-12-30 19:32:04 +01:00
Martin Chaine
292d9c9f01
fix BOM option value
2016-12-30 19:32:04 +01:00
Martin Chaine
88a8548017
fix typo
2016-12-30 19:32:04 +01:00
Martin Chaine
2c3b2e9b52
fix indent options and add whitespaces ones
2016-12-30 19:32:04 +01:00
Dan Rosén
5ddc28eaad
Fix comment-leader auto-insertion
...
Fixes #1074
2016-12-29 01:39:02 +01:00
Harm Aarts
f9c860d235
Add Handlebars syntax highlighting.
...
This is based on the HAML syntax highlighting. Of note is the loading of
the html highlighter since Handlebars is embedded in html.
2016-12-21 21:31:05 +01:00
Leira Hua
e10f1e53fc
fixed clang-complete on macOS, paste command need - to read from stdin
2016-12-18 23:18:15 -08:00
Lee Machin
94d72c4bad
Add basic PHP syntax highlighting
...
based on the highlighting for JS
2016-12-16 19:20:26 +02:00
Matt Schick
6deaed01de
Add face 'GitDiffFlags' for git diff flag_lines
...
No defaults have been altered, just added the ability to do user override. The existing facespec had a background of 'black', which ends up looking a little harsh for people who do black text on a white background.
2016-12-15 06:09:27 -08:00
Maxime Coste
1bdf26fd6e
Merge remote-tracking branch 'casimir/remove-mimetype'
2016-12-14 13:30:59 +00:00
Maxime Coste
a132985888
Fix uses of renamed make_current_error_line option
...
Fixes #952
2016-12-10 13:39:02 +00:00
Martin Chaine
7384288e07
transform mimetype to a fallback option
...
The option is now used as a fallback when detection by extension fails. Some
scripts like `base/mail.kak` and `base/html.kak` still rely heavily on it.
2016-12-06 17:48:46 +01:00
Maxime Coste
d88d0bac42
Rework editorconfig.kak to make it more robust and handle tabs more correctly
2016-12-02 13:44:51 +00:00
Frank LENORMAND
7f9e24cdbf
Remove flake8.kak
, deprecated by lint.kak
...
Builtin support for `flake8` can be obtained using the following:
```
set window lintcmd 'flake8 --filename=* --format="%(path)s:%(row)d:%(col)d: error: %(text)s"'
```
2016-11-22 10:56:17 +03:00
wheatdog
cf096a1f19
enhance latex.kak: comments, \%, \_, \$
2016-11-19 23:01:07 +08:00
Maxime Coste
dcd733e5fa
Do a first phase of command renaming
2016-11-14 00:27:14 +00:00
Martin Chaine
352c56bfb5
let the user set the format hook
2016-11-06 17:22:54 +01:00
Martin Chaine
28e37b608d
remove trailing whitespaces
2016-11-05 18:40:37 +01:00
Martin Chaine
590e28ea7f
Extended support for go
...
completion, auto-format, documentation and more
2016-11-05 17:54:56 +01:00
Maxime Coste
4b2004c6ff
git-tools.kak: Fix passing of custom parameters to git commit
2016-10-24 20:45:57 +01:00
Martin Chaine
d7d79af8b4
Add taskpaper basic support
2016-10-21 13:32:17 +02:00
Maxime Coste
658d993d71
Try to fix autorestore posix compatibility
2016-10-17 21:31:56 +01:00
Frank LENORMAND
5db1d1beef
Move the commenting variables back to commenting.kak
...
Initialising the `comment_line_chars` and `comment_selection_chars` variables
in language support scripts created a hard dependency of those scripts
to `commenting.kak`, which would create errors when this script was not
loaded, e.g. when running tests.
2016-10-14 22:12:01 +03:00
Frank LENORMAND
8b5cf3feb0
Add a missing then
keyword to an if
statement
2016-10-12 15:35:25 +03:00
Frank LENORMAND
f6a2925950
Fix, complete and add docstring documentation to builtin commands
...
Level out the builtin commands loaded at startup in terms of format and
expressiveness. The following convention was followed:
* commands that take more than one argument have to be described along
with their parameters prior to the actual documentation, otherwise the
docstring consists in a capitalized sentence
e.g. `command <arg1>: do something`
* optional arguments are enclosed in square brackets, to comply with the
format used for hardcoded commands
e.g. `cd [<directory>]`
* describe the effects of the command in the documentation string and
omit implementation details unless they are relevant. Usually command
names include the name of the tool they use, so they don't need to be
redundantly mentioned
e.g. `tmux-new-pane <arguments>: open a new pane`
* document the format the parameters to the commands, or list them if
they are to be chosen among a list of static values (c.f. `spell.kak`)
2016-10-11 10:26:17 +03:00
Maxime Coste
d89959dfa8
autorestore.kak: more tweaks, a WIP version was pushed by error
2016-10-07 08:57:45 +01:00
Maxime Coste
1970cb68c9
Refactor autorestore.kak to make it faster
2016-10-06 22:35:07 +01:00
Maxime Coste
8a4cf85e22
Use eval -no-hooks when writing the buffer in a tmp file for scripting purposes
2016-10-03 20:29:54 +01:00
Maxime Coste
1b9c8b9cf2
Fix hool -> hook in rc files
2016-10-01 14:09:59 +01:00
Maxime Coste
e65aa4a6de
Merge remote-tracking branch 'greduan/highlighter-group'
2016-10-01 13:43:21 +01:00
Maxime Coste
a66aed21c2
Merge remote-tracking branch 'lenormf/fix-flake8'
2016-09-28 21:47:09 +01:00
Maxime Coste
098c94b878
Do not automatically enable ranger on directory open errors
...
Use an explicit command that does that 'ranger-open-on-edit-directory'
and remove the file_manager option that is not needed anymore.
2016-09-28 19:34:29 +01:00
greduan
a68f5f20a1
Add highlight group to highlighters rmhl hooks
2016-09-28 08:45:01 +02:00
greduan
6c6359de93
Add highlight group to highlighters addhl hooks
2016-09-28 08:25:02 +02:00
Alex Leferry 2
503b5bea4c
add ranger.kak
2016-09-26 11:51:53 +02:00
Frank LENORMAND
fbc2091df9
Rewrite some non POSIX conditionals
2016-09-24 12:49:19 +03:00
Maxime Coste
6f8d5d2e1f
Merge remote-tracking branch 'alexherbo2/ranger-rc'
2016-09-22 23:19:37 +01:00