Comments (3)
related to #9. Sometimes the callback is called way to often, this seems to coincide with the opening of an autocomplete window. Even though the buffer does not change the change tick increases.
To solve this I would need a performant method to quickly detect if the buffer actually changed since the last call
from prosesitter.nvim.
- comparing the received args will not work as a user could be replacing the same part of a line.
- storing the last changed text in memory might work
- TODO inspect columns to see if we can deduce something from them (edits over a 0 range?)
from prosesitter.nvim.
having typed # hell
logging buf: <buf_id> <change_idx> <start_col>-<old_col>-<new_col> followed by the content of the line
the output: (italic when the content did not change)
on_event.lua:70: registering callback
on_event.lua:98: buf: 1 nil nil-nil-nil
on_event.lua:110: { "" }
on_event.lua:98: buf: 1 3 0-0-1
on_event.lua:110: { "#" }
on_event.lua:98: buf: 1 4 1-0-1
on_event.lua:110: { "# " }
on_event.lua:98: buf: 1 5 2-0-1
on_event.lua:110: { "# h" }
on_event.lua:98: buf: 1 6 3-0-1
on_event.lua:110: { "# he" }
on_event.lua:98: buf: 1 7 3-1-0
on_event.lua:110: { "# he" }
on_event.lua:98: buf: 1 8 2-1-0
on_event.lua:110: { "# he" }
on_event.lua:98: buf: 1 9 2-0-1
on_event.lua:110: { "# he" }
on_event.lua:98: buf: 1 10 3-0-1
on_event.lua:110: { "# he" }
on_event.lua:98: buf: 1 11 4-0-1
on_event.lua:110: { "# hel" }
on_event.lua:110: { "# hel" }
on_event.lua:98: buf: 1 13 3-1-0
on_event.lua:110: { "# hel" }
on_event.lua:98: buf: 1 14 2-1-0
on_event.lua:110: { "# hel" }
on_event.lua:98: buf: 1 15 2-0-1
on_event.lua:110: { "# hel" }
on_event.lua:98: buf: 1 16 3-0-1
on_event.lua:110: { "# hel" }
on_event.lua:98: buf: 1 17 4-0-1
on_event.lua:110: { "# hel" }
on_event.lua:98: buf: 1 18 5-0-1
on_event.lua:110: { "# hell" }
on_event.lua:98: buf: 1 19 5-1-0
on_event.lua:110: { "# hell" }
on_event.lua:98: buf: 1 20 4-1-0
on_event.lua:110: { "# hell" }
on_event.lua:98: buf: 1 21 3-1-0
on_event.lua:110: { "# hell" }
on_event.lua:98: buf: 1 22 2-1-0
on_event.lua:110: { "# hell" }
on_event.lua:98: buf: 1 23 2-0-1
on_event.lua:110: { "# hell" }
on_event.lua:98: buf: 1 24 3-0-1
on_event.lua:110: { "# hell" }
on_event.lua:98: buf: 1 25 4-0-1
on_event.lua:110: { "# hell" }
on_event.lua:98: buf: 1 26 5-0-1
on_event.lua:110: { "# hell" }
From these numbers I do not see a way to detect buffer change
from prosesitter.nvim.
Related Issues (20)
- Latex query should not capture math txt HOT 1
- Latex brackets, parenthesis etc not passed to spellchecker HOT 2
- attempt to index local parser (a nil value) HOT 3
- (Latex?) brackets introduce space HOT 3
- Hover window shows TODO instead of lint source HOT 1
- Python docstring has unpaired " warning HOT 4
- PsDisable not removing highlights HOT 2
- Deleting gives error HOT 2
- attempt to index a nil value HOT 1
- strip urls and paths from strings HOT 1
- Ignore symbols from code HOT 1
- More specific lint target
- Nav and Hover get different ExtMarks HOT 1
- No linked issue assert HOT 2
- Add debug flag and debug asserts
- Lintreq contains duplicates HOT 1
- Disable sometimes malfunctions HOT 1
- backend install crashing with indent-blankline installed HOT 5
- Recognise python docstrings
- Keep track of performance metrics HOT 1
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 prosesitter.nvim.