aboutsummaryrefslogtreecommitdiff
path: root/data/plugins/autocomplete.lua
AgeCommit message (Collapse)Author
2024-07-19Use core.warn on autocomplete pluginjgmdev
2024-06-28autocomplete: strip punctuations from partials (#117)Jefferson González
When triggered manually and first character is a punctuation, it causes none of the items to match if they don't also contain the punctiation. We remove the punctuations to ensure results with plugins like lsp will match even if the don't contain the starting punctuation symbol. This solves issues in languages like C/C++ where # causes lsp to return a list of snippets as follows: * if * ifndef * include Without this change non of the items would match.
2024-06-25Rebase window creation and management to Lua (#108)Jefferson González
* move window creation and management to Lua (#1751) * remove scaling logic from font code for the time being its been hardcoded to 1 for the non SDL Renderer basewin setup, so nothing is lost for non MacOS users. will be revisited in the future when scaling is improved with SDL3 and moved into scripts. * remove unused window_renderer argument from font functions * move window logic to lua, pass window via argument * rename window creation functions `*_create`, `*_destroy`, add real init * Set active window when processing frame * get size directly from RenWindow, get active window size from renderer * correct reverted draw calls * fix window not reappearing on restart * add simple logic to persist the core window * fix style * add renwindow documentation * make windows hidden by default again * reorder ren_update_rects execution, add comment to note future work * Adapt code that calls system.win functions * Remove scale detection from start.lua * Trimmed spaces from renwindow docs * Enable darkmode on window creation and added min win size --------- Co-authored-by: Jan <sentrycraft123@gmail.com>
2024-03-11Improve `CommandView` and `autocomplete` scroll behavior (#1732)Guldoman
Add a config option for the maximum number of visible entries in the command palette. * Make `autocomplete` item scrolling more natural
2024-03-05Fixes to autocomplete re-sizing code (#76)Jefferson González
This PR improves upon #67 and restores correct highlight colors.
2024-02-14Added adaptive sizing to autocomplete plugin (#67)Jefferson González
This change handles the issue reported on lite-xl/lite-xl-lsp#82 about the suggestions box becoming too wide to be visible when the symbols text is too large. Instead of delegating the responsability to plugins making use of the autocomplete API we tackle the issue directly on the plugin itself by performing the required calculations to resize the suggestions box and truncate items text when needed.
2024-02-14Expose get_partial_symbol on autocomplete plugin (#66)Jefferson González
This function will allow other plugins like LSP to easily access the partial symbol of the currently active DocView. Also this commit introduces: * Documentation of internal data structures used by the plugin for easier understanding of the code and completion support. * Documentation of the plublicly exposed functions.
2023-11-20Check if doc cached on symbols iteratorjgmdev
2023-08-07Syntax files symbol_pattern, non_word_chars props (#12)Jefferson González
Added the ability of overwriting the default config.symbol_pattern and config.non_word_chars from language files by using the following properties: * symbol_pattern * non_word_chars * symbol_non_word_chars - used by autocomplete plugin to detect the starting of a symbol when translating from current cursor position This change will allow languages like css that support the `-` as part of a symbol name to define custom symbols pattern and non word characters for better autocompletion and lsp behavior.
2023-05-14Autocomplete plugin improvementsjgmdev
* Support suggestion symbols scoping - global: all open documents - local: current document - related: all open documents with same syntax - none: language syntax symbols only * Register style.syntax[] entries as icons * Other related fixes
2023-05-14Assert if color name not in style.syntaxjgmdev
2023-05-14Added support for non syntax colorsjgmdev
2023-05-10Removed redundant flag checkjgmdev
2023-05-10Add icons support to autocomplete pluginjgmdev
2023-04-07add autocompletion to multicursor (#1394)vqn
* use Doc:remove
2022-12-06autocomplete: wrap the autocomplete results around (#1223)Techie Guy
2022-10-25plugin autocomplete: update partial on manual triggerjgmdev
2022-09-12autocomplete: properly replace current partial symboljgmdev
2022-08-16Use `Object:is` instead of direct metatable comparison in `autocomplete`Guldoman
2022-08-16Allow command predicates to manage parameters passed to the commandsGuldoman
When a command is performed with parameters, those are now passed to the predicate. The predicate can then return, after the validity boolean, any other value that will then be passed to the actual command. If the predicate only returns the validity boolean, the original parameters are passed through to the actual command. This allows predicates to manipulate the received parameters, and allows them to pass the result of an expensive computation to the actual command, which won't have to recalculate it. String and table predicates will now also return `core.active_view`.
2022-06-29`autocomplete`: Fix "Too many symbols" message when `Doc` has no nameGuldoman
Before, when a `Doc` had no name, an error was thrown.
2022-05-31plugins: dropped --lite-xl version tagjgmdev
2022-05-23plugins: added settings gui supportjgmdev
2022-05-04Updated linewrap and autocomplete to use the new get_line_screen_position ↵Adam Harrison
which takes a col.
2022-04-24Merge branch 'master' into master-2.1Adam
2022-04-11Merge pull request #913 from lite-xl/auto-complete-syntax-symbolsFrancesco
Add syntax symbols for auto-complete
2022-04-10Add syntax symbols for auto-completeFrancesco Abbate
2022-04-10Early `break` if `autocomplete` needs to updateGuldoman
2022-04-10Consider last document line to gather `autocomplete` symbolsGuldoman
2022-04-03Bumping version numbers.Adam Harrison
2022-02-03Update autocomplete with changes needed for latest LSP plugin.jgmdev
2022-01-22Added in new merge method, and run it on plugins. Also made it so plugin ↵Adam Harrison
configs can be set anywhere, even if we don't know the plugin beforehand.
2021-09-09revert new keyboard bindingstakase1121
2021-09-09add autocomplete:cycletakase1121
Some (probably lots) of people are used to tabbing through autocomplete. now, tab is binded to autocomplete:cycle while enter is binded to autocomplete:complete.
2021-08-30Bring back min len autocomplete default to 3Francesco Abbate
2021-08-172.0 changelog and modversion updates.Adam Harrison
2021-08-02Fix missing commas in autocomplete moduleFrancesco Abbate
2021-07-20Merged dev to master.Adam Harrison
2021-07-15Typo.Adam Harrison
2021-07-15Namespace plugin-specific configuration settings.Adam Harrison
2021-05-05Introduce new plugin versioning tag mod-versionFrancesco Abbate
New plugins should use the version tag: -- mod-version: 1 The old version tag "-- lite-xl 1.16" will be considerer equivalent to mod-version 1.
2021-04-06Add plugin verification by version tagFrancesco Abbate
2020-11-17Add a warning when disable auto-complete due to too many symbolsFrancesco Abbate
2020-11-14Implement limits for maximum number of symbols in autocompleteFrancesco Abbate
Implemented to avoid excessive memory usage when loading big files with many unique words.
2020-05-11Added custom suggestions support to autocompleterxi
`autocomplete.add()` can now be used to add additional auto complete suggestions with descriptions
2019-12-28Initial commitrxi