Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace Code Completion Bug - Drops First Period #34

Closed
swifty162 opened this issue Nov 20, 2021 · 1 comment
Closed

Namespace Code Completion Bug - Drops First Period #34

swifty162 opened this issue Nov 20, 2021 · 1 comment

Comments

@swifty162
Copy link

When selecting a namespace from the predicted drop-down menu, the initial period is removed from the text. See examples below.

// a table called
.my.table
// typing below results in option for .my and also .my.table
.m
// select .my.table returns
my.table
// likewise typing
.my.ta
// choose .my.table from drop-down returns
my.table

@swifty162 swifty162 changed the title Namespace Auto-Fill Bug Namespace Code Completion Bug - Drops First Period Nov 20, 2021
@komsit37
Copy link
Owner

Yes, I have had this issue for a while too, but didn't get around to fix it.

I will document how completions is done here in case you or anyone wants to tackle it

Here is how it works:

  1. After every command is sent, the plugin executes additional q code to retrieve list of variables for completions

    res = q(QUpdateCompletionsCommand.query())

  2. reads the results, and set it to global settings so sublime text can read it later

    self.view.settings().set('q_compl', compl)

  3. on_query_completions handles key type event, and return possible completions

    def on_query_completions(self, view, prefix, locations):

Feel free to ask additional questions

pindash added a commit to pindash/sublime-q that referenced this issue Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants