Closed genericrohan closed 2 months ago
Treesitter taks care of: highlighting, indenting, incremental selection. Any of these can be disabled with :TSDisable
:
However, the behaviour you described is not caused by Treesitter, I tried running plain nvim without any plugins
nvim --clean
and it behaves the same, so it must be caused by some built-in rules. I was not able to disable this and I tried:
:set nocindent
:set noautoindent
:set nosmartindent
See: :help indent
for more info about the above (https://neovim.io/doc/user/indent.html)
Sorry I don't have a solution, just some additional info for context.
Perhaps someone else will be able to answer this.
I went digging around the nvim runtime files for css:
/usr/share/nvim/runtime/indent/css.vim
/usr/share/nvim/runtime/ftplugin/css.vim
/usr/share/nvim/runtime/ftplugin/css.lua
/usr/share/nvim/runtime/syntax/css.vim
And found these additional options:
setlocal omnifunc=csscomplete#CompleteCSS
setlocal indentexpr=GetCSSIndent()
However, what is causing the described behaviour is:
setlocal comments=s1:/*,mb:*,ex:*/ commentstring&
And can be disabled with:
:set comments=
This should probably be refined further, but I guess it's a starting point.
@dam9000 Thanks a bunch for digging in!
In any case, please feel free to file a bug against the main Neovim repo for runtime improvements. This isn't a kickstart issue.
Hi, I'm new to coding and just learning nvim because I hate making progress in my life and prefer side-quests instead, apparently. Anyway...
I am using nvim w/ kickstart's config to edit a
.css
file and when I try to write css for the*
selector, the...autocomplete...thing (idk what it's called) seems to treat it as a multi-line comment. What I mean is, if I start with:and then press
<Enter>
with my cursor between the braces, I end up with:instead of
I know it's probably some plugin or something that does this, but I'm not sure which one or which one I should file the actual bug report with. I asked ChatGPT and it said that tree-sitter-css is only for syntax highlighting and since it's the only css thing I remember installing during the setup of neovim, I'm not sure what else to look for.
If someone can point me in the right direction, that would be appreciated.