-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some support for TOML files #4503
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! We should use this PR as an up2date example of writing a language support module.
I quickly looked through it as first pass (no real review) and added two minor comments inline. Good job!
I think it would be good to have at least a basic "black box" test for this which parses a file and checks that nothing explodes.
ide/languages.toml/src/org/netbeans/modules/languages/toml/TomlLexer.java
Outdated
Show resolved
Hide resolved
As of tests, I still need to study the Yaml language support how to write them. There could be some edge cases in the keyboard handling and the code completion. |
Great work, will help me also to extend other languages and add more :) |
ide/languages.toml/src/org/netbeans/modules/languages/toml/LexerInputCharStream.java
Show resolved
Hide resolved
ide/languages.toml/src/org/netbeans/modules/languages/toml/TomlLexer.java
Outdated
Show resolved
Hide resolved
ide/languages.toml/src/org/netbeans/modules/languages/toml/layer.xml
Outdated
Show resolved
Hide resolved
ide/languages.toml/src/org/netbeans/modules/languages/toml/TomlCompletionProvider.java
Outdated
Show resolved
Hide resolved
TokenHierarchy th = TokenHierarchy.get(doc); | ||
TokenSequence<TomlTokenId> ts = th.tokenSequence(); | ||
ts.move(offset); | ||
ts.movePrevious(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe check the result of movePrevious
; indicates end(begin)-of-token stream
ide/languages.toml/src/org/netbeans/modules/languages/toml/TomlTypedTextInterceptor.java
Outdated
Show resolved
Hide resolved
* Add tomlj library. * Added support for TOML Lexer * Added a few useful keystrokes for TOML * Added transparent backround to the TOML icon. * Added a simple TOML completion provider * Enabled TOML formatting options * Adjusted TOML Syntax Coloring * Remove some cruft on TOML Support * Polishing TOML Support * Added TOML Support to Editor Kit as dependency * Added some testing for TOML
This support provides the following: