Commit Graph

699 Commits (36b2ac97efd94119dbf0aa8618ae6c68265a43b8)

Author SHA1 Message Date
John Benediktsson 3fdb0325ca misc: update vim syntax for ?change-at. 2020-08-17 10:14:13 -07:00
John Benediktsson 60dd083bcb misc/vim: highlight predicate classes. 2020-08-14 13:28:48 -07:00
John Benediktsson 5176b270d2 misc: more syntax tests. 2020-08-14 13:22:34 -07:00
Dusk a67f2a4a05 vim/syntax: Even more fixups.
|:syn-priority| is respected now, :syn-skip & :syn-keepend are used
when appropriate, newlines don't jank stuff up, comments don't extend
match regions, numbers are much more reliable, and stack effect error
highlights return.

A feature request has even been sent to Bram.
https://github.com/vim/vim/issues/872#issuecomment-641025231
2020-06-10 03:12:30 +00:00
John Benediktsson d59cb0a672 misc/vim: change stack effects to not highlight when required
This is due to optional requirement in some forms, for example M:.
2020-06-08 12:03:54 -07:00
John Benediktsson 0dd87cc282 misc/vim: fix NAN: highlighting, and private generic definitions. 2020-06-08 11:38:30 -07:00
John Benediktsson 17e862b801 misc: add private definitions to syntax-test file. 2020-06-08 11:21:09 -07:00
John Benediktsson f3bd6dd183 misc/vim/syntax: fix private word highlights. 2020-06-08 11:21:09 -07:00
John Benediktsson 440b56a9f0 misc/vim: dos2unix factor-docs.vim. 2020-06-08 11:21:09 -07:00
John Benediktsson d9210f738d editors.vim.generate-syntax: merge in factor.vim.fgen. 2020-06-08 11:21:09 -07:00
Dusk 70cf73b032 fixup! [misc] vim/syntax: Fixups
(Thanks, @mrjbq7!) Now:
+ `CHAR:` literals highlight the whole next token.
+ `0b...` binary literals don't require invalid `+=0b` or `-=0b` syntax.
+ Float literals can't start with a `,` separator.
+ Float literals can have exponents with `,` separators.
+ `foo: ...` stack effects function as intended in general.
+ Syntax clusters might be a bit cleaner with `g:factor_syn_no_error`.
+ Error match priority should be cleaned up.
2020-06-07 05:35:13 +00:00
Dusk f70ce01b51 editors.vim.generate-syntax: Match new generation
Also update the vim/syntax README.
2020-06-06 20:32:17 -07:00
Dusk 35b8621306 [misc] vim/syntax: Fixups
(Thanks, @mrjbq7!) Now:
+ `CHAR:` literals highlight the whole next token.
+ `0b...` binary literals don't require invalid `+=0b` or `-=0b` syntax.
+ Float literals can't start with a `,` separator.
+ Float literals can have exponents with `,` separators.
+ `foo: ...` stack effects function as intended in general.
+ Syntax clusters might be a bit cleaner with `g:factor_syn_no_error`.
2020-06-06 20:31:59 -07:00
John Benediktsson 0a8cb5f2c1 misc: adding a syntax-test file. 2020-06-06 19:04:21 -07:00
John Benediktsson 61635500f2 vim: missed a char in 0b fix. 2020-06-06 19:02:21 -07:00
John Benediktsson ddf498d5ad vim: fix syntax highlighting of CHAR:, 0b, NAN:. 2020-06-06 19:00:41 -07:00
Dusk 14b1418f6a [misc] vim/syntax: Overhaul syntax highlighting
Also fixes comments in a lot more places than a few commits ago.

Syntax like the following is proper, and the comment highlighting fixes
from last commit make the incorrect highlighting here really stand out:

```factor
USE: ! only this line highlights
  kernel
```
2020-06-07 00:10:18 +00:00
Dusk 35799f8d2d [misc] vim/syntax: Avoid extra group captures 2020-06-07 00:10:18 +00:00
Dusk 686f707078 [misc] vim/syntax: Very magic patterns
From Vim's |pattern.txt|, |/\v| |/\V|:
> Use of "\v" means that after it, all ASCII characters except
> '0'-'9', 'a'-'z', 'A'-'Z' and '_' have special meaning: "very magic"

This mostly makes some upcoming syntax pattern refactoring cleaner,
though most patterns still get shorter here.
2020-06-07 00:10:18 +00:00
Dusk 11757d87fb [misc] vim/syntax: Proper comment precedence
Now comments, a lexer level feature, won't get beat out by rather normal
syntactic parser constructs like `STRUCT:`.
2020-06-07 00:10:18 +00:00
Dusk 710b54869a [misc] vim: Hygenic text width highlights
This lets Factor's overly long line highlighting avoid bleeding over
into documentation source buffers, or buffers of other non-Factor file
types entirely. Also, by taking `:2match` instead of `:match`,
clobbering of most user matches (or vice versa) can be avoided.

Unfortunately, the highlighting effects all windows in a multi-buffer
split setup, but since we can't reasonably make this a `:syntax match`
group, it'll have to do. (And this behavior isn't new.)
2020-06-07 00:10:18 +00:00
Silvio Mayolo 454f192562 Added imenu tags to factor-mode for Emacs 2020-05-14 15:16:55 +00:00
John Benediktsson 07833d94c6 misc/vim: update syntax for cartesian-find. 2019-12-13 19:31:17 -08:00
John Benediktsson ec58d39bb2 misc/vim: update vim syntax keywords. 2019-12-13 14:41:43 -08:00
timor 13b0da9182 FUEL: make `fuel-refactor-inline-word` work with hyphenated words
The emacs command `kill-word`, used by `fuel-factor-inline-word` does not
delete the complete word if that contains hyphens.  Using `kill-sexps` instead
exhibits correct behavior.
2019-06-11 06:50:31 -07:00
timor 82893dceee FUEL: don't jump to USING: section after updating 2019-05-10 15:41:25 -07:00
Doug Coleman 9f213f96f6 core: Add the shuffler words but without primitives.
The nipd branch slowed bootstrap by a minute, this patch does not.

sorry about changing the fjsc line endings...
2018-06-19 22:52:58 -05:00
Björn Lindqvist 780bbd49cf FUEL: this defcustom is unused 2018-02-24 23:11:22 +01:00
John Benediktsson fcaf4eb39c misc/vim: update syntax file for none? addition. 2018-02-14 11:57:05 -08:00
Björn Lindqvist 8c223d4073 FUEL: fuel-edit-word is kind of redundant
fuel-edit-word-at-point does the same job when the caret is not on a
word.
2018-02-07 20:49:46 +01:00
Björn Lindqvist d13a8b6325 FUEL: fix cmd syntax of call to fuel-scaffold-vocab 2018-02-07 20:29:05 +01:00
Björn Lindqvist f86d9edec3 FUEL: remove fuel-scaffold-developer-name
It seem unlikely that someone would need this variable when you can
instead use user-full-name or set developer-name in Factor.
2018-02-07 19:41:48 +01:00
Björn Lindqvist 5d27f004a1 FUEL: refactoring to eliminate the eval-result variable
This makes the FUEL <-> Elisp ipc much simpler. All code called from
Elisp should put one result item on the stack. The fuel-pprint word
serializes it.
2018-02-07 18:38:28 +01:00
Björn Lindqvist e257280abd FUEL: a bunch of functions replaced with alist-get calls 2018-02-06 06:16:29 +01:00
Björn Lindqvist 428023ad22 FUEL: alist-get instead of (cdr (assoc key alist))
alist-get is a new function in emacs 25. It makes working with assocs
a bit simpler.
2018-02-06 06:16:29 +01:00
Björn Lindqvist d4e8d0a1fe FUEL: fix rendering of $synopsis markup.
It is rendered exactly the same as $see markup. It works well and was
the easiest fix to the problem.
2018-02-01 15:43:27 +01:00
Björn Lindqvist 5709e0b621 FUEL: improved fuel-get-uses
The path to the source file needs to be set when parsing, in case a
syntax word uses 'where' or some similar word.
2018-01-29 12:12:07 +01:00
Björn Lindqvist dbf21ca102 FUEL: better font-locking of gl-related words 2018-01-24 14:27:31 +01:00
John Benediktsson e82ea77524 misc/vim/syntax: update factor syntax. 2018-01-18 15:33:08 -08:00
Doug Coleman 64d8b29ac3 LICENSE.txt: Use the proper BSD2 license text so that github recognizes it. Fixes #1876. 2017-12-17 19:14:43 -06:00
Doug Coleman 08771e950f fuel: Update syntax for ;FUNCTOR> and ;EBNF 2017-08-05 22:30:18 -05:00
Björn Lindqvist 3dd7ed200f FUEL: fixing markup to indent multiline code correctly 2017-07-09 10:39:16 +02:00
Björn Lindqvist 3cb47a947e FUEL: need to specify vocab containing developer-name 2017-07-07 15:26:03 +02:00
Björn Lindqvist 6649e4a426 FUEL: ensures fuel-listener-mode and factor-mode has the same syntax table 2017-07-06 00:34:11 +02:00
Björn Lindqvist 3dd40b5ef3 FUEL: more consistent font-locking of strings 2017-07-06 00:34:11 +02:00
John Benediktsson ce6653bb65 misc/fuel: fix typo. 2017-07-05 09:35:25 -07:00
Björn Lindqvist 1eed7e7f5b FUEL: indenting the code examples in fuel looks cool 2017-07-04 18:08:26 +02:00
Björn Lindqvist 1265bb3b5c FUEL: cool breadcrumb navigation for help pages 2017-07-04 15:23:04 +02:00
Björn Lindqvist 89473cc048 FUEL: fixing the name of the $vocab markup word 2017-07-04 11:22:31 +02:00
Björn Lindqvist b720e46bc7 FUEL: clickabe http urls in fuel help 2017-07-04 03:29:14 +02:00