Sublime Forum

St have auto complete buit-in for HTML and CSS?

#1

Do CSS and HTML have built-in auto-completion in sublime text? I uninstalled lsp plugins for html,css and type script still css and html giving auto completion just not the javascript.

I think CSS and HTML have auto-completion built-in in sublime text. and it works when I start to write and hit tab or start writing with angel brackets then it gives suggestions. (unless one other plugin I have installed doing it but I removed everything related to html/css/js/autocomplete.)

so if built-in autocomplete for CSS and HTML has all the tag suggestions I don’t even need LSP to install now. unless LSP provides some other features.

CSS (without LSP) and js (with LSP installed) are good – it suggests things without needing to hit ‘Tab’ or any other symbols.

Now I’m asking: How can I make HTML suggest things like CSS and JavaScript do, without extra keys?

0 Likes

LSP-html not working
#2
1 Like

#3

Thanks. I need some clarification.
with what should I replace “python”?

Can these packages be used as-is, or do they require any additional configuration? If I clone the repository or download just the HTML/CSS package, where should I place the files inside the “Packages” folder? Also, how can I verify that they are functioning correctly and test them?
thanks.

0 Likes

#4

They are builtin. That was what I mean to imply.

0 Likes

#5

Now I’m asking: How can I make HTML suggest things like CSS and JavaScript do, without extra keys?

Again. Everything should be supplied in a proper context. If you insist to have everything suggested anywhere you may try to modify this part: https://github.com/sublimehq/Packages/blob/af68b026a8661268c4fcc4690b0d377c0eb4ea13/HTML/html_completions.py#L457-L497

Though I think emmet-ls will be your best try as in another similar post (LSP-html not working).

1 Like

#6

Thanks. I think using ‘tab’ is my best solution for now also the angel ‘<’ bracket.
as I have learned through trial and error. and also I can see that on this post.

no matter what plugin or LSP I use for HTML it will not give recommendations without typing the ‘<’ bracket.
I’ll try to modify the config file. It would’ve been nice if it was easy to configure or even work out of the box-like code dose.
Thanks, dude. your help means a lot :slight_smile:

0 Likes

#7

You may manually trigger autocompletion. Not sure whether it helps but it’s an easy trial. Just ctrl+space. Or maybe cmd+space (?) for Mac machine.

1 Like

#8

yes, it does trigger autocompletion. and it will be easier than ‘<’ or tab. I wonder why there is no option where I don’t need to do any extra steps. I’m used to writing HTML on code this way.

0 Likes

#9

I added this to my ‘Preferences > Settings’. Now, auto-complete triggers with every keystroke. using this for more than a week now, didn’t noticed any issues.

“auto_complete_triggers”: [
{
“characters”: “abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<>/\”,
“selector”: “text.html”
}

0 Likes