Comments (5)
Not sure if it is possible to catch all 3rd party syntaxes programmatically.
In this case I think a set of defaults in a syntax specific settings file for each of the most well known packages or a Preferences.sublime-settings with the list of rules might be the best idea.
Alternatively we could file an issue in https://github.com/sublimehq/Packages/issues to ask for selectors to be added to the default syntax packages. From my perspective this was even better as even simple word completion triggered by ->
or ::
or .
in C/C++ by default is even better than nothing and you don't need to mess around with settings which belong to external packages.
from lsp.
The problem with ->
and ::
has always been (IMO) that you'll have to use >:
as the trigger characters and that will also trigger on less-than signs and ternary operators. I'd like to see support for trigger strings instead of trigger characters. Anyway, you can just add a file like C++.sublime-settings
and add those triggers if you want, see e.g. here.
In this case I think a set of defaults in a syntax specific settings file for each of the most well known packages or a Preferences.sublime-settings with the list of rules might be the best idea.
I agree.
from lsp.
I did not know Packages could contribute syntax-specific settings! If these can be overridden by the user's C++.sublime-settings
, then I would be in favour of collecting sensible defaults in a /Languages
subfolder.
I like the trigger strings suggestion, we should revisit it in a future issue (or feel free to create one now)
from lsp.
I like the trigger strings suggestion
Yes, but I think this is more of a core sublime issue. Other plugins have worked around this limitation of Sublime in various ways by checking the surrounding text upon a completion trigger.
If these can be overridden by the user
from lsp.
As this issue cannot solve missing completion triggers generically, I'll close it but leave this summary:
- Language/server specific LSP add-ons are a great place to apply sensible non-LSP Sublime defaults
- Multi-character trigger awareness would likely improve responsiveness around spread operators (
...
) in javascript and or scope resolution operators (::
or Paamayim Nekudotayim, lol) in many languages. For this I'll create a new issue.
from lsp.
Related Issues (20)
- goto definition cursor position is one char behind HOT 6
- Crash when removing a folder from sublime HOT 7
- setting for 'diagnostics' hover popup HOT 2
- Containerized development workflow HOT 3
- Keep server running without a related source file open? HOT 6
- Latest version breaks on startup HOT 2
- [clangd] Duplicated references HOT 6
- Find references not working across the project but only on opened files HOT 8
- Sublime Text Becomes unresponsive when hovered on variable containing large data (Variable Storing embeded font data) HOT 16
- `KeyError` in LSP plugin when trying to open Preferences HOT 3
- Goto Definition throws HOT 4
- Deprecate ST3 support for LSP-* packages HOT 1
- Feature: Only format when project configured for formatting HOT 8
- Disabling/Uninstalling the package resets Sublime Text's color scheme HOT 4
- Progress for migrating to python 3.8 HOT 7
- Option to disable code lens reference counter to reduce screen clutter HOT 2
- LSP messaging does not properly handle trailing `.0` on integer values HOT 7
- Plugin does not reflect `lsp_code_actions_on_save` settings HOT 3
- Can't disable code lens in settings HOT 4
- Formatting code show in hover popups HOT 2
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 lsp.