Open abelsiqueira opened 4 months ago
With the latests version of the plugin, the issue with resetting shiftwidth
should be solved by adding let g:julia_set_indentation=0
in your init.vim file.
The version shipped with neovim by default is a reduced version (this is also why you get that error when you try to just take the ftplugin.vim file from here). The part of the file in the reduced version with shiftwidth< expandtab< indentexpr< indentkeys<
is wrong, those settings should just be removed from there.
Until that happens, what you can do is install the plugin from this repo using a plugin manager and then use g:julia_set_indentation
as I was writing above.
Disclaimer: Sorry if this is not accurate, I am not very familiar with vim/neovim internals.
On NeoVIM, the value of
shiftwidth
should be inferred from EditorConfig'sindent_size
, but it appears to be overwritten or unset byundo_ftplugin
. I am using NeoVIM 0.9.5, and the configuration file is https://github.com/neovim/neovim/blob/master/runtime/ftplugin/julia.vim. By removingshiftwidth
from line 27, the value ofshiftwidth
is properly inferred from editorconfig.I think that #280 is related.
shiftwidth
was removed by 88f178c but reintroduced by #294.The file from NeoVIM's repo says that this is the homepage for that file, but I noticed that they are not the same, so I was not sure where to report. Let me know if it's better to do there. That being said, when I use this file instead, I get the following error:
Error message
``` Error detected while processing BufReadPost Autocommands for "*": Error executing lua callback: ...brew/Cellar/neovim/0.9.5/share/nvim/runtime/filetype.lua:24: Error executing lua: ...brew/Cellar/neovim/0.9.5/share/nvim/ runtime/filetype.lua:25: BufReadPost Autocommands for "*"..FileType Autocommands for "*"..functionThanks in advance for the help. If the solution is creating a PR removing shiftwidth, I can definitely help.