sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
803 stars 39 forks source link

`ignored_snippets` doesn't ignore `*.sublime-completions` #3133

Open randy3k opened 4 years ago

randy3k commented 4 years ago

Description

As title: ignored_snippets doesn't ignore *.sublime-completions

Steps to reproduce

  1. set ignored_snippets to ["C++/*"]
  2. Open an empty file, set the C syntax
  3. Type #include <std
  4. The snippets for stdio.h etc are shown. These snippets are defined in C++/C Standard Includes.sublime-completions.

Expected behavior

ignored_snippets should also ignore *.sublime-completions.

Actual behavior

ignored_snippets does not ignore *.sublime-completions.

Environment

randy3k commented 4 years ago

If it is a intended behaviour, I suggest added one more setting to ignore the sublime-completions files

keith-hall commented 4 years ago

possible duplicate of https://github.com/sublimehq/sublime_text/issues/901

randy3k commented 4 years ago

Ya, #901 is a bit more general.

wbond commented 4 years ago

I would not expect ignoring snippets to ignore completions, as they are fundamentally a bit different, and used for different things.

I'd be curious to see reactions for other users to see if this is a common requests.

For now, since there is usually only a single completion file, you can create an empty override.

randy3k commented 4 years ago

While completions are different from snippets, it is confusing to see that these completions are marked as snippets.

Screen Shot 2019-12-05 at 11 37 23 AM
deathaxe commented 4 years ago

I could imagine ST will offer an opportunity to specify the kind of a completion some day. Maybe by adding additional keys to the sublime-completions file.

{"trigger": "label()\tfunction", "kind": "function", "description": "blabla"," "contents": "label($1)"},

The main question is just how to organize the kind information without needing to repeat them in each entry.

wbond commented 4 years ago

Yes, I do have the intention of adding kind info to completions. I have not yet spent time to think about how to augment the format for it yet.

jrappen commented 4 years ago

In ST4073+ .sublime-completions can now supply kind, annotation and details.


Sublime Text:
  build: 4073
  channel: dev
    portable: false
  platform: osx x64

System:
  hardware: MBP 15" 2018, i9 2.9GHz, 32GB, 1TB, Radeon Pro 560X
  software: macOS Catalina 10.15.4 (19E266)
    open_gl:
      gl_api_version: 4.1 INTEL-14.5.22
      glsl_version: 4.10
      vendor: Intel Inc.
      renderer: Intel(R) UHD Graphics 630