Skip to content

Commit

Permalink
Update README for the ts_fold changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed Nov 9, 2023
1 parent 18304b8 commit 231968a
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -884,14 +884,6 @@ You can in place edit your code in floating window
Treetsitter symbols in all buffers
![treesitter](https://user-images.githubusercontent.com/1681295/118734953-cc6eba00-b882-11eb-9db8-0a052630d57e.jpg?raw=true)

### Signature help

Improved signature help with current parameter highlighted

![signature](https://github.com/ray-x/files/blob/master/img/navigator/signature_with_highlight.jpg?raw=true)

![show_signature](https://github.com/ray-x/files/blob/master/img/navigator/show_signnature.gif?raw=true "show_signature")

### Call hierarchy (incomming/outgoing calls)

![incomming_calls](https://user-images.githubusercontent.com/1681295/142348079-49b71486-4f16-4f10-95c9-483aad11c262.jpg)
Expand All @@ -914,20 +906,41 @@ Codelens for C++/ccls. Symbol reference

![nerdfont](https://github.com/ray-x/files/blob/master/img/navigator/icon_nerd.jpg?raw=true)

### VS-code style folding with treesitter
### Enhanced Folding Inspired by VS Code Using Treesitter

This feature introduces an advanced folding mechanism based on a customized variant of the treesitter folding algorithm (enabled with the ts_fold option).

Folding is using a hacked version of treesitter folding. (option: ts_fold)
#### function folding

#### folding function
The `end` delimiter of a function is recognized as a distinct

![image](https://user-images.githubusercontent.com/1681295/148491596-6cd6c507-c157-4536-b8c4-dc969436763a.png)

#### folding comments
#### comments folding

Multiline comments can be folded as it is treated as a block
Multiline comments are recognized as distinct blocks and can be collapsed seamlessly, simplifying navigation through extensive comments.

![image](https://user-images.githubusercontent.com/1681295/148491845-5ffb18ea-f05d-4229-aec3-aa635b3de814.png)

#### Condition (if) block folding with syntax highlight

syntax highlight require treesitter and neovim 0.10 +

<img width="602" alt="image" src="https://user-images.githubusercontent.com/1681295/281574649-ecc911d3-bfe2-446a-9eb7-318600b37c30.png">

#### Function folding with syntax highlight

<img width="550" alt="image"
src="https://user-images.githubusercontent.com/1681295/281575203-3d08256a-7592-4bea-8e6a-c747023ff3a3.png">

### Signature help

Improved signature help with current parameter highlighted

![signature](https://github.com/ray-x/files/blob/master/img/navigator/signature_with_highlight.jpg?raw=true)

![show_signature](https://github.com/ray-x/files/blob/master/img/navigator/show_signnature.gif?raw=true "show_signature")

## Debugging the plugin

One simple way to gather debug info and understand what is wrong is to output the debug logs
Expand Down

0 comments on commit 231968a

Please sign in to comment.