Comments (1)
The problem with the nesting is that apparently treesitter doesn't parse the XML document into a nested structure. When I run :InspectTree
, I see this:
(STag) ; [1:1 - 27]
(Name) ; [1:2 - 9]
(Attribute) ; [1:11 - 26]
(Name) ; [1:11 - 14]
(AttValue) ; [1:16 - 26]
(CharData) ; [1:28 - 2:1]
(STag) ; [2:2 - 25]
(Name) ; [2:3 - 7]
(Attribute) ; [2:9 - 24]
(Name) ; [2:9 - 12]
(AttValue) ; [2:14 - 24]
(CharData) ; [2:26 - 3:8]
(STag) ; [3:9 - 16]
(ERROR) ; [3:10 - 10]
(Name) ; [3:11 - 15]
(CharData) ; [3:17 - 4:0]
(STag) ; [4:1 - 11]
(ERROR) ; [4:2 - 2]
(Name) ; [4:3 - 10]
(content) ; [4:12 - 5:0]
(CharData) ; [4:12 - 5:0]
Since treesitter doesn't nest the parsed AST, the symbols won't be nested either. There are ways around it. For other, similar filetypes I've added custom logic to enforce the nesting based on some other properties I can detect. Here's how it works for markdown:
aerial.nvim/lua/aerial/backends/treesitter/extensions.lua
Lines 111 to 124 in e2e3bc2
from aerial.nvim.
Related Issues (20)
- bug: "AerialOpen float" is always empty, but "left" and "right" work HOT 11
- bug: :bdelete will crash or close nvim when an inactive Aerial buffer is open HOT 1
- Question HOT 1
- bug: Floating window is closed when jump even with `close_on_select = false` HOT 2
- bug: Missing symbols when using treesitter as backend HOT 1
- Missing treesitter symbols for javascript HOT 1
- feature request: same method in sub- and/or in super-class; display all the methods of a class including inherited ones HOT 3
- bug: lua/aerial/util.lua:236: attempt to index local 'ignore' (a nil value) HOT 1
- bug: PHP Symbol Outline Not Hierarchical when using LSP HOT 4
- bug: golang missing variables, constants, fields if functions or structs are enabled
- bug: telescope aerial stays at mid HOT 5
- bug: `:AerialToggle` does nothing while the cursor in inside `:Neotree` HOT 1
- Support for filtering by tags in the telescope
- feature request: add option to not ignore diff windows
- feature request: workspace-level symbols HOT 2
- bug: need to delete the keymaps before mapping a new one HOT 1
- bug: `julia` treesitter queries broken after latest `nvim-treesitter` update
- feature request: autofocus while toggle HOT 2
- Missing symbols for YAML with treesitter
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 aerial.nvim.