News for hackers. Stuff that matters.

predragnikolic

IntelliSense for Vue 3 in Sublime Text

Hello everyone!You probably saw the new Vue 3 <script setup> syntax. You might have heard of Volar, a language server that provides full support for this syntax. However, what you might not know is that Volar is now available for Sublime Text as well!I introduce you the new LPS-volar plugin for Sublime Text. For more info see: https://github.com/sublimelsp/LSP-volar#installation

( Read More... | no comments | 2 points | on HN )
Re:Sublime Text 4 on Tuesday May 25, 2021 @04:31PM (#27282225)
Let me also give an insight why keybindings are UNBOUND :)

Each person has different criteria of what is important, Some people like code actions, some think it is the goto definition command, but almost all keybinding in LSP are UNBOUND. The main reason is to not cause conflicts with default keybindings.

Here is an example for code actions. Most editors use `ctrl+.` to trigger code actions, but `ctrl+.` is a default ST keybinding used to go to the next modification in the code.

A lot of people consider it bad if a plugin overrides default keybindings, so LSP lets the user decide what keybinding to assign to LSP commands.

Hope the explanation helps.

Re:Sublime Text 4 on Tuesday May 25, 2021 @04:18PM (#27282043)
Hello, one of the LSP contributors here.

Just wanted to share my thoughts on why LSP as an open source plugin has more benefits than getting first class support from ST devs.

Cons of getting first class support from ST:

- ST is closed source. That would mean that the LSP source code would be closed source too and that would not allow other people to contribute to it.

- Implementing the LSP client in c++ won't make the user experience faster. The speed mostly depends on the speed a language server returns a response to the LSP client.

- ST devs would shift focus on implementing the LSP spec which is mainly driven by Microsoft and the spec is somewhat driven by VS Code functionality. So ST would chase after offering the same functionality as VS Code, but then always be a step back.

Having LSP as a plugin allows the best for both ST users and ST devs. It allows ST users to contribute to the LSP plugin, while ST devs can focus on making ST more awesome on their own way and adding new API-s.

All I can say is that LSP already has first class support, because the ST devs have specifically expanded the API to allow LSP to implement certain features. :)