They don't overlap in functionality at all. LSP is a protocol for communicating with IDE plugins. Tree-Sitter is a parser.
They're often used together. I've written a couple of language servers that use Tree-Sitter to parse documents.
For example when you hover something in VSCode it uses the LSP to communicate with the language server and say "oi, what's on line 5 column 10" and then the language server uses Tree Sitter to parse the document and figure out the answer (or some other parser).
They're often used together. I've written a couple of language servers that use Tree-Sitter to parse documents.
For example when you hover something in VSCode it uses the LSP to communicate with the language server and say "oi, what's on line 5 column 10" and then the language server uses Tree Sitter to parse the document and figure out the answer (or some other parser).