Sublime Forum

Change priority of completions

#1

So I have this long completions file, which works great.

The problem is that completion from words in the current file get obscured or ignored, if the word has some similarity with one from the completions file. I have already augmented the “auto_complete_size_limit” and still I cannot get completion for some words in the current file.

According to the documentation sublimetext.info/docs/en/referen … tions.html

[quote]Priority of Sources for Completions
Snippets
API-injected completions
.sublime-completions files
Words in buffer[/quote]

So is there a way to give priority to word from the current file over completions files?
Is there a way to disable fuzzy search on a specific completions file?

0 Likes

#2

I got around this in my PythonCompletion.py file. I obtain the standard completions using extract_completions, add them to (extend) my own completions list - either inserting them at the top or, as I do, sorting the entire list - then inhibiting these standard completions. I also took the opportunity to add the description ‘Default’ to the standard completions.

I don’t know about disabling fuzzy search, as I didn’t really need to do (or attempt) this.

0 Likes

#3

[quote=“agibsonsw”]I got around this in my PythonCompletion.py file. I obtain the standard completions using extract_completions, add them to (extend) my own completions list - either inserting them at the top or, as I do, sorting the entire list - then inhibiting these standard completions. I also took the opportunity to add the description ‘Default’ to the standard completions.

I don’t know about disabling fuzzy search, as I didn’t really need to do (or attempt) this.[/quote]

Thanks for the tip, I’ll check your python file.

In the mean time it seems I have been able to overcome this by using the all autocomplete package. I suppose it must do something similar to your own PythonCompletion.py

Thanks again!

0 Likes

#4

Hi agibsonsw and pier,
Sorry for being dumb at Python, but can you share your .py solution?
I want give “Word in Buffer” higher priority than \Data\Packages\Autohotkey\Autohotkey.sublime-completions
so, what .py should be?

0 Likes