* language_cpp: add back digit separators
* language_cpp: rewrite number matching in regex
* language_c: port digit separators over from language_cpp
(cherry picked from commit 8ea0393800bb59a214e8a6efd5b9fb69282803a9)
* common: allow / and \ as PATHSEP on Windows when fuzzy matching files
* common: fix PLATFORM == Windows
(cherry picked from commit 5d6ae412e76e69181a3b46c79b8408fbd55183c9)
Previously it would use the last char position, which resulted in incorrect values when the next char had a different size than the current one.
(cherry picked from commit f066c88e186a02b9912d7f102b541f514ae1aa35)
* added a stupid __tostring to every object
* moved every __tostring to just after the :extend() call
---------
Co-authored-by: Adam <adamdharrison@gmail.com>
(cherry picked from commit 880e7f1fa1521cdf176f44627a27c901e187058e)
* Update css plugin to support more units
* Fixed spacing.
---------
Co-authored-by: Adam Harrison <adamdharrison@gmail.com>
(cherry picked from commit 7a4260600509e26337e67ce65ff3c66eec79d3b6)
* improve projectsearch
- stick status to top of view
- add horizontal scrolling
- added ellipsis at the end of the text if it's too long
* Reverted removal of 0 on yield.
---------
Co-authored-by: Adam Harrison <adamdharrison@gmail.com>
This is needed because we use `mtime` to determine if a file has actually changed, but on most systems this has a resolution of 1 second (and we truncate it to an integer anyways).
Without this wait, we would skip reloading a file that has been changed multiple times in the same `mtime` second, thus losing some data.
* macos: support drag-and-drop and default file associations
* resources/macos: use LSItemContentTypes to narrow down files
* macos: support opening folders
* rootview: workaround macos weird dnd event timing
* core/rootview: rename variable and refactor if statement
* Update language_python.lua
* Update language_python.lua
* Update language_python.lua
* implemented a better `python_type` subsyntax
* Update language_python.lua
* fixed a small error where you couldn't hint a type at a var and guive it a value at the same time
* Update language_python.lua
* Update language_python.lua
Dictionaries appear now normally
* Update language_python.lua
* added suggestions concerning strings
* commited suggestion
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* Various changes
* Update language_python.lua
Syntax more optimized but a tiny bit more complex...
* Simplified everything
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* improve number highlighting for c
* add unsigned suffix
* add long suffixes
* reorder octal literals and add suffix for hex numbers
* fix integer and float suffixes
too many characters, send help
* fix: avoid iterating over a changing table in `run_threads`
This is done to avoid iterating over a table that can change in the meantime.
More precisely the issue appears if a thread is removed from the table, we yield early from `run_threads` because we reached the end of the frame, and a new thread is added before the next iteration.
For example:
```lua
local lost_time = false
core.add_thread(function()
-- force early yield
local t0 = system.get_time()
while system.get_time() - t0 < .1 do end
lost_time = true
end, "a")
local step = core.step
function core.step()
if lost_time then
-- add a new thread while run_threads hasn't finished iterating
core.add_thread(function()end, "a1")
lost_time = false
end
return step()
end
```
would crash with `invalid key to 'next'`.
* fix: only run coroutine if it wasn't removed
* fix: don't handle `core.threads` table as an array
This caused some entries to be skipped or even removed erroneously.
* Make command palette item scrolling more natural
Also add a config option for the maximum number of visible entries in the command palette.
* Make `autocomplete` item scrolling more natural
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
* Improve `autocomplete` suggestions box sizing
This avoids that the box gets too big because of non-visible items, and makes it reactive to window sizing.
* Draw ellipsis when `autocomplete` entries aren't fully visible
* Improve number highlighting for python syntax highlighting
Adds support for octal and binary representation, as well uppercase characters (X, B and O)
* add underscore and negative hex/oct/bin value support
* Removed | from pattern
* fix nagbar failed save message
- visually separated statements with a `.`
- first statement slightly rewritten
- use `'` rather than `"`
* yeahhhh no back to `"`