Open eo1989 opened 2 years ago
This project seems no longer maintained, and treesitter functionality is IMHO outside the scope of this plugin, so don't get your hopes too high. Could you elaborate what kind of functionality/features are you specifically expecting?
Hey, what is the difference between this plugin and nvim-treesitter?
Treesitter and Semshi have different focus and goals. In a nutshell treesitter is only for "syntax" and not concerned about "semantics", where the goal of semshi is semantic highlighting.
Treesitter is parser, it can parse python code into a syntax tree using the internal parser, for highlight, indentation, or any other vim-related features. Semshi also builds python AST but relies on the python's built-in ast
module. Both allows simple and basic highlighting (actually for "syntax" highlighting purpose treesitter is much better), what semshi can do apart from treesitter is semantic highlighting.
For example, highlighting unused variables, local variables v.s. closure, scope-awareness, deprecated functions, etc. This requires more language-aware understanding of the code beyond the abstract syntax tree. This can be also achieved by LSP's semantic tokens, but the current language servers like pyright, python-language-server do not have a feature of semantic tokens. Semshi makes uses python's symbol table or environments to understand a bit more of semantics to make this possible, although not fully comprehensive.
So you can use treesitter (or regex-based vim syntax) and semshi together complementarily. Features other than semantic highlighting (such as renaming variables, syntax errors, goto, etc.) were useful before the advent of LSPs but are now superseded by neovim's built-in LSP support. Eventually semshi won't be needed if python LSPs provide a full support of semantic tokens, but until then semshi can provide users with some goodies.
As the title states, and I do recall it being discussed in chats (zulip, iirc)/forums, but it has been a minute since then. Is there any news on where this plugins' development may lead? Any plans to implement/merge treesitter/lsp features?
Thank you for this great plugin! @numirias