sublimelsp / LSP-css

CSS, SCSS, LESS support for Sublime's LSP plugin
MIT License
37 stars 0 forks source link

Autocomplete flex-direction/flex-basis on tab #25

Closed dwhenson closed 3 years ago

dwhenson commented 3 years ago

Apologies another smaller issue...

When trying to autocomplete some values the suggestions do not match what is completed.

Examples include 'flex-direction' completing to 'float: dirc' and 'flex-basis' completing to 'float: b'.

Sublime text's suggestions are also not suppressed as in other LSPs.

Please let me know if you need more details or information on this.

jfcherng commented 3 years ago

My first guess would be the "autocompletion" provided by Emmet confuses you. Or the tab key is hijacked by Emmet.

dwhenson commented 3 years ago

Good first guess!! Disabling Emmet seems to solve the completion problem. I’m still getting duplicate suggestions though, with other LSPs seem to have suppressed.

rwols commented 3 years ago

You can set "only_show_lsp_completions": true in Preferences/User/LSP.sublime-settings if you don't want word completions from ST. Or, if you're using ST4, set "inhibit_word_completions": true.

dwhenson commented 3 years ago

Thanks. I had those settings already included and the seem to work for other LSP languages but not CSS. Where it still shows ST suggestions.

I just tried disabling the CSS3 package and it has now improved as ST now only seems to suggest text (I.e with the “abc”) label at the end of the suggestion.

I’d still prefer it not to suggest that though. But this is already a nice improvement.

predragnikolic commented 3 years ago

I’m still getting duplicate suggestions though, with other LSPs seem to have suppressed.

Screenshot 2021-01-17 at 15 13 15

You can remove the duplicated completions by doing these steps:

  1. Open a *.css file,
  2. Chose Preferences > Settings - Syntax Specific, that will open CSS.sublime-settings
  3. Add this to CSS.sublime-settings:
    // These settings override both User and Default settings for the CSS syntax
    {
    "disable_default_completions": true
    }

After that, you wont get duplicated completions.

Screenshot 2021-01-17 at 15 13 22
predragnikolic commented 3 years ago

If you still have an issue with this feel free to reopen it.