aboutsummaryrefslogtreecommitdiff
path: root/data/plugins/treeview.lua
AgeCommit message (Collapse)Author
2022-01-09Fix undue asserts in dmon_extraFrancesco Abbate
Some asserts are placed in case that can effectively occur so we remove the assertion and we return false. In turn we adapt the logic accordingly so when false is returned to add a watch we do not open that directory.
2022-01-07Clear TreeView cache when closing projectFrancesco Abbate
2021-12-28Avoid references to project's dir in TreeViewFrancesco Abbate
It is not a good practice to keep a reference to the project's directory object outside of the "core" module itself. The TreeView was using such a reference in the cache item for each file or directory entry. Replace the reference to the object with the absolute name of the project directory.
2021-12-20Ensure TreeView cache entry is removed on deleteFrancesco Abbate
Address issue: https://github.com/lite-xl/lite-xl/issues/689 Attempt to provide a more accurate fix to commit: 59f64088e1e88f2f2a29e4d5418ccdf781fdc12e For this latter what happens is that any change inside a directory cause the corresponding entry to be folded in the TreeView. The new change is more accurate because we remove only the stale entry corresponding to the delete event and we do not reset the cache of the parent directory using the modify event.
2021-11-07In `TreeView` set correct active `View` before opening new `DocView`Guldoman
Before this, the new `DocView` was always added to the primary `Node`. With this, it gets added to the last focused `Node`.
2021-10-21Fix problem with treeview keeping the editor busyFrancesco Abbate
Fix a problem introduced when fixing the dirty pixel problem, commit cb08c5c. The node, when determining the layout was rounding the size of the fixed-size view. In turns this latter was calling move_towards to the default_size it wanted. If default_size was non-integer the value vas never archieved because it was rounded during layout and move_towars was keeping the editor busy by setting the core.need_redraw flag.
2021-10-21Fix problem with treeview x resizingFrancesco Abbate
The x size of the treeview plugin cannot really change expect if explicitly resized. The call to move_towards for x seems to raise a state where core.redraw is always set to true and this prevent the application to go idle. It is seen after the introduction of the dmon directory monitoring but it is not clear why it wasn't seen before.
2021-10-08Implement directory monitoring using septag/dmonFrancesco Abbate
Use a notification based directory monitoring based on the septag/dmon lirbary instead of periodically rescan the whole project's tree.
2021-10-02Normalize to project dir in treeview openFrancesco Abbate
When left-clicking in a TreeView file we use now core.normalize_to_project_dir to normalize correctly the file name.
2021-10-02Reset syntax highlighting on file renameGuldoman
2021-09-07Fix `treeview:open-in-system` command on WindowsGuldoman
The first argument is the title for the `CMD` window.
2021-09-02Avoid exposing `treeview` commands when not usableGuldoman
2021-09-02Make open files follow renamesGuldoman
2021-08-172.0 changelog and modversion updates.Adam Harrison
2021-07-15Namespace plugin-specific configuration settings.Adam Harrison
2021-07-12Added delete confirmation using NagView.jgmdev
2021-07-11Make use of core.reschedule_project_scan()jgmdev
2021-06-28Added context menu to treeview.jgmdev
2021-06-17Do not try to update topdir folder in treeviewFrancesco Abbate
If the directory expanded is a project's top directory do not attempt to update its content. Fix again issue #275
2021-06-17Fix error in dirname computation in TreeViewFrancesco Abbate
In TreeView:on_mouse_pressed() we need to find the directory a relative filename belongs to from its absolute filename. The code was using string.find to locate the relative filename within the absolute path but in some very specific cases we can find a pattern which is not the right-most one leading to a wrong directory name. Fix the error by adding a loop to make sure we find the right-most match. The standard Lua library has not a string.rfind to make a reverse search. Close #275
2021-05-26Implement lazy loading of directoriesFrancesco Abbate
When the number of files in a project directory is above the max limit switch back to a mechanism to read directory content only when the corresponding folder is expanded in the treeview. When the command core:find-file is invoked the command core:open-file is executed instead because the complete list of the project's files is not available. When a project search is done we search through all the files within the project dir without indexing them. Address issues #217 #203 #183.
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
2021-03-20rename tooltip_alpha_step to tooltip_alpha_ratetakase1121
2021-03-20set delay to 0.5 and disable animationtakase1121
2021-03-20show tooltips only when hovering over texttakase1121
2021-03-20prevent rendering tooltip when alpha is 0takase1121
2021-03-18tooltip enhancements (#114)Takase
Add a delay to show the tooltip and other improvements.
2021-03-14normalize tooltip filename to home dirtakase1121
2021-03-13add tooltips to treeview.lua (#100)Takase
2021-03-06Ensure filename are store relative to project directoryFrancesco Abbate
2021-02-27Ensure treeview is large enough to show toolbarFrancesco Abbate
2021-02-27Fix resize behavior of treeview and toolbarFrancesco Abbate
Now toolbarview always compute up-to-date sizes and spacing to adapt to changes in icon big font. For treeview and toolbarview revert the goto_size approach to use the original approach of rxi/lite. In order to make it work when user resizes dragging the divider we use the view optional method set_target_size(). This latter changes the view's target size instead of changing its size right away. The size is only changed by the lite's layout and animation system. Remove the config.treeview_size variable that was no longer working because plugins are loaded before the user's config.
2021-02-24Fix spacing in treeviewFrancesco Abbate
Previous setting was not okay with monospaced fonts
2021-02-16Restore original key binding for trreview toggleFrancesco Abbate
2021-02-15Adding final details for toolbarview pluginFrancesco Abbate
2021-02-15Fix treesize toggle command and transitionFrancesco Abbate
2021-02-15Implement proper layout of toolbarFrancesco Abbate
2021-02-11Makes resizable attribute explicit in Node:split()Francesco Abbate
2021-02-09First preliminary implementation of treeview resizeFrancesco Abbate
Works but only cover resize along x.
2021-01-19Fix conflict in treeview for top directoriesFrancesco Abbate
Happened if a filename has the same name of a top directory. It will cause a collision in the string to identify the entry into the cache.
2021-01-10Fix problem when project directory has a trailing slashFrancesco Abbate
2020-12-30Add scrolling bar to TreeViewFrancesco Abbate
2020-12-30Fix project change and quit versus workspace pluginFrancesco Abbate
2020-12-30Remove mouse command to remove directory and remap create directoryFrancesco Abbate
Create directory is now re-mapped to control+(left click).
2020-12-30Add command to create a directory in a new category "files"Francesco Abbate
Use the alt + (left click) is tree view to create a directory and shift + (middle click) to remove a project directory.
2020-12-28Add command to remove a directory from the projectFrancesco Abbate
In addition directories can be removed with a mouse middle-click in the tree view pane.
2020-12-28Change project files output to not include a prefix '/' in filenameFrancesco Abbate
It make sense to not put the initial '/' in the filename as the name is relative to the top directory it belongs to. By removing the the initial '/' in the filename we can re-introduce the variable core.project_files to stay compatible with standard Lite. The project_files variable will always point to the files table of the first entry of core.project_directories.
2020-12-27Finalize add project directory featureFrancesco Abbate
2020-12-27Use relative path for filenames in project directoriesFrancesco Abbate