Comments (8)
Yi (repository) has strong, incremental parsers for highlighting.
from kakoune.
Supporting grammars is seducing, however having a performant, data driven, incremental, tolerant (as most of the time you are working on an invalid program) parser seems more like a research project. It is not a goal at the moment for Kakoune.
from kakoune.
I was expecting this answer. The reason why I open this issue is because of
your TODO. Regex are simple, definitely, but perfectible to describe well a
language. Regex highlighters are just a quick and dirty helper to please our
eyes.
from kakoune.
Have you look at Yi? It is an interesting project, like Kakoune. It still needs more love.
from kakoune.
I did, parsers are coded in Haskell and compiled in, so not really data driven.
from kakoune.
I know this is an ancient issue. But recently I found this project: http://tree-sitter.github.io/tree-sitter/ (created by the Github organisation). It seems to address exactly the issues raised in #50 (comment) by @mawww. From the website:
- General enough to parse any programming language
- Fast enough to parse on every keystroke in a text editor
- Robust enough to provide useful results even in the presence of syntax errors
- Dependency-free so that the runtime library (which is written in pure C) can be embedded in any application
It has been around for a while now speaking to it's maturity.
from kakoune.
Related ongoing PR about tree-sitter: #3160
Also https://github.com/ul/kak-tree for selectors
from kakoune.
That's pretty spectacular. I hadn't even thought about selections! Syntax highlighting was my annoyance. It's just too damn hard to write regexes (think code in string interpolations, ugh).
from kakoune.
Related Issues (20)
- [BUG] 2024.05.09 tests failing on Alpine Linux HOT 16
- [BUG] Tests failing on OpenBSD HOT 10
- [BUG] Files getting created when using autocomplete HOT 3
- [BUG] HOT 1
- [REQUEST] revert f26d4ea4 for putting tmux into background again HOT 7
- [BUG] Viewport motion no longer takes scrolloff into account
- [BUG] WhitespaceIndent face overridden by language highlighting HOT 1
- [BUG] setting a face to itself in kakrc causes hang HOT 5
- License on Logo HOT 2
- [BUG][CRASH] regex is broken HOT 1
- [BUG/QUESTION] UTF-8 characters render as question marks in kak under WezTerm on MacOS HOT 2
- [BUG] inconsistent syntax in asciidoc for buffers enclosed by stars such as scratch HOT 2
- [BUG] rendering issue in asciidoc with nested stars and backticks HOT 6
- [BUG] Alternations in lookarounds produce an unhelpful error message
- cygwin compilation error using gcc (windows10) HOT 7
- How to remove the format charaters in the man buffer [QUESTION] HOT 3
- [BUG] Numpad/Keypad numbers produce garbage
- [BUG] (?S) flag strangely changes lookaround behavior HOT 1
- [BUG][CRASH] Signal: 11 (SEGV) HOT 11
- [BUG] Commands relying on viewport donβt work in non-interactive mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kakoune.