Giter Club home page Giter Club logo

Comments (5)

deathaxe avatar deathaxe commented on May 27, 2024

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.

rwols avatar rwols commented on May 27, 2024

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.

tomv564 avatar tomv564 commented on May 27, 2024

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.

rwols avatar rwols commented on May 27, 2024

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

Yep: http://docs.sublimetext.info/en/sublime-text-3/customization/settings.html#order-of-precedence-of-sublime-settings-files

from lsp.

tomv564 avatar tomv564 commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.