Commit Graph

647 Commits

Author SHA1 Message Date
Jonathan Hähne
b33e26612a Add option to truncate long completions
The detail entries for big structs such as std.zig.CrossTarget were
bricking the preview window in Sublime Text.
2021-03-27 20:37:51 +01:00
Alexandros Naskos
3e300e4d74
Added our own ifFull implementation, fixes some crashes 2021-03-26 21:46:49 +02:00
Alexandros Naskos
9eece0985b
Fixed crash while typing error. 2021-03-26 21:14:47 +02:00
Alexandros Naskos
2fd8ab7626
Fixed error.<Foo> highlighting 2021-03-26 21:11:35 +02:00
Alexandros Naskos
06518778c1
Removed comment preprocessing code from the semantic tokens gap highlighter,
Fixed various comment semantic highlighting issues.
Refactored some minor parts of the analysis code.
2021-03-26 21:04:51 +02:00
Alexandros Naskos
2a57789be8
Merge pull request #260 from InterplanetaryEngineer/master
Add option for builtin completion insert text
2021-03-26 11:32:01 +02:00
Jonathan Hähne
a2620d7f69 Add option for builtin completion insert text 2021-03-26 10:20:20 +01:00
Alexandros Naskos
eb0a31d282
Reversed builtin completion insert text 2021-03-26 09:23:40 +02:00
Alexandros Naskos
2ff6476ce1
Merge pull request #259 from KevinGConyers/master
Added YouCompleteMe Instructions
2021-03-26 09:16:26 +02:00
Kevin
e67d4c6ecd Added YouCompleteInstructions 2021-03-25 23:37:14 -04:00
Alexandros Naskos
1120cef011
Merge pull request #256 from InterplanetaryEngineer/master
Fix completion of builtins and very slightly simplify a piece of logic
2021-03-25 12:53:58 +02:00
Jonathan Hähne
8d34232c7a Fix completion of builtins and a piece of slightly overcomplicated logic 2021-03-24 22:40:15 +01:00
Alexandros Naskos
4198edbdaa
Merge pull request #255 from bnjmnt4n/docs/emacs
Emacs: update setup instructions
2021-03-21 12:16:54 +02:00
Benjamin Tan
add0c567ad
Emacs: update setup instructions
`lsp-mode` now has built-in configuration for zls, so the only
configuration that might be required is setting the location of the zls
executable (or placing it in the PATH).

`doom-emacs` has not updated to use the latest version of `lsp-mode`
yet, so its configuration cannot be simplified. However, I've updated
the snippet for configuration to avoid loading `lsp-mode` on startup,
which can cause significant slowdown to Emacs startup, and instead defer
loading it until it is required.
2021-03-21 17:29:30 +08:00
Alexandros Naskos
55ad1028fc
Fixed crash in analysis of variable declaration aliases 2021-03-21 02:31:32 +02:00
Alexandros Naskos
3ad218b3ad
Merge pull request #253 from Ominitay/master
Doom Emacs Changes
2021-03-18 13:36:26 +02:00
Ominitay
9e36b7aef4
Change Doom in README to match other instructions 2021-03-18 10:53:45 +00:00
Ominitay
88033a159f
Added Doom Emacs instructions to config 2021-03-18 10:44:24 +00:00
Auguste Rame
2db3c6f5a0
Fix small README typo 2021-03-17 19:51:39 -04:00
Auguste Rame
92831bedf5
Merge pull request #252 from Ominitay/master
Add usage for Doom Emacs.
2021-03-17 17:57:09 -04:00
Ominitay
29049bc467
Add usage for Doom Emacs.
All credit goes to @g-w1 for this :3
2021-03-17 21:37:51 +00:00
Auguste Rame
8c7a93fdf3
Merge pull request #249 from NotNite/resolve-paths
Use fs.path.resolve to find Zig binary during config
2021-03-15 09:01:17 -04:00
Auguste Rame
ef4a60541e
Merge pull request #251 from rhysd/filterText-insertText-falsy
Fix falsy value for filterText and insertText
2021-03-15 08:59:59 -04:00
rhysd
6057d290b4 Fix falsy value for filterText and insertText
'filterText' and 'insertText' fields of 'CompletionItem' can only have
"" or undefined as falsy value.

https://github.com/microsoft/language-server-protocol/issues/1222
2021-03-15 20:20:38 +09:00
Auguste Rame
521b795201
Merge pull request #247 from Luukdegram/stability
Fix crashes when still editing/inserting invalid code
2021-03-14 11:47:25 -04:00
NotNite
fdace9abfe
use fs.resolve on path resolution 2021-03-13 23:25:37 -05:00
Luuk de Gram
472033a845
Improve token location stability 2021-03-13 12:22:19 +01:00
Auguste Rame
6c6f716bca
Merge pull request #236 from slimsag/patch-1
README: describe how to quickly install ZLS on MacOS/Linux
2021-03-12 15:13:46 -05:00
Auguste Rame
d5c46aef26
Merge pull request #245 from rhysd/error-msg-newlines
Add missing \n in error message output to stderr
2021-03-12 14:21:25 -05:00
Auguste Rame
2b488347ff
Merge pull request #238 from Luukdegram/std-fixes
Update to Zig std's new AST format
2021-03-12 12:57:03 -05:00
Luuk de Gram
0d85668ce4
Do not offer completion for function labels 2021-03-12 11:56:51 +01:00
Luuk de Gram
7a2cd418a8
Scope fixes + semantic token colors:
- Creates a scope for errdefer and adds the payload as a declaration
  (Previously lhs was a token index meaning we had an out of bounds error due too high of an integer)
- Semantic highlighting corrected for error payloads in loops/ifs and errdefers
2021-03-11 20:45:05 +01:00
Luuk de Gram
ef1b3c95f1
Completion fixes:
- Fixes namespace completions. Uses pointers instead of indices to ensure they are unique
- Adds .ptr completion to slices and `*` to many pointer
2021-03-11 13:59:09 +01:00
Luuk de Gram
094b31be48
Fix namespaces in containers 2021-03-10 17:04:14 +01:00
rhysd
addecb3a37 Add missing \n in error message output to stderr 2021-03-10 20:24:43 +09:00
Luuk de Gram
85937d48ca
Semantic token + scope fixes:
- Highlights pipes of loops/elses payloads correctly
- New ast structure counts last token as the variable itself and not the '}' so change scope checking to '<=' instead of '<'
2021-03-10 10:02:07 +01:00
Luuk de Gram
3ac6c82b9a
Completion for index label in for loops and fix for function snippets 2021-03-09 19:53:59 +01:00
Luuk de Gram
858f3cb282
Completion of unions in switches and its tags 2021-03-09 12:35:56 +01:00
Luuk de Gram
20cb0b7307
Fix off by one scope end index 2021-03-08 20:31:02 +01:00
Luuk de Gram
43ebfc7300
Work on completion for unwrapped slices/optionals in loops/ifs 2021-03-08 19:46:23 +01:00
Luuk de Gram
fd6b94bcc9
Fixes multiple small bugs:
- Correct completion based on scope
 - Semantic tokens for while/if/else/for keywords
 - Fix crash on import path
2021-03-07 21:54:54 +01:00
Luuk de Gram
a078a62a37
Semantic tokens: Allow for multiple line comments 2021-03-07 18:52:22 +01:00
Luuk de Gram
53c37765c0
Fix inferred error set return types 2021-03-07 18:45:37 +01:00
Luuk de Gram
e2f4bbf2f3
Implement semantic tokens for regular comments 2021-03-07 14:51:47 +01:00
Luuk de Gram
ac8a00342e
All functionalities implemented. Also implemented ability to skip searching for references through std 2021-03-06 20:55:59 +01:00
Luuk de Gram
3d8a9732fc
Calculate correct token locations and ensure all semantic highlighting matches 2021-03-05 22:38:42 +01:00
Luuk de Gram
acc45b4efe
Use the correct tree to display semantic tokens 2021-03-04 22:53:54 +01:00
Luuk de Gram
9224bbd4dc
Implement all of the semantic tokens 2021-03-04 22:30:25 +01:00
Luuk de Gram
08075a1261
Start fixing semantic tokens 2021-03-04 16:14:30 +01:00
Luuk de Gram
a80e9b262e
Implement usingnamespace and fix function snippets 2021-03-04 13:26:11 +01:00