-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will not automatically start the plugin. #3
Comments
Hello. I just did some tests using a super minimal init.lua config, but for me it worked perfectly. To help me understand what's going on, could you check and see if it works when you use this barebones configuration? To check if it is working you can open any file that is indented using spaces and then press the tab key and see if it inserts spaces (in which case the plugin is working) or not. local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
end
return require('packer').startup(function(use)
use({
"nmac427/guess-indent.nvim",
config = function()
require("guess-indent").setup({})
end,
})
if packer_bootstrap then
require('packer').sync()
end
end) Additionally can you try running nvim in verbose mode (
|
My workaround is:
// Edit |
Hi, sorry for the late reply. I get the output, but it is still not working.
I tried your version with my workaround. So I think the lua call itself is not working?
So for now, the best for me to get it working is:
|
Hmm... That's weird. The first change I'm interested in: What happens if you change the autocmd on line 16 of init.lua to The second change: If you change the autocmd on the same line to
|
I have the same issue, it doesn't automatically start the plugin |
I figured out that the issue for me is that local default_config = {
auto_cmd = true,
filetype_exclude = {
"netrw",
"tutor",
"",
},
-- ... So I'm just gonna go and override that require'guess-indent'.setup { filetype_exclude = { "netrw", "tutor" } } |
Yes, it seems very likely that this might have been the culprit. Thanks! @danbruegge can you pull the latest version and check if this finally fixed your issue? |
The plugin works out of the box when I use the minimal config mentioned above, but when I switch to my customized Also neither of theses alternative configs work for me: vim.api.nvim_exec([[ autocmd BufReadPost * :silent lua require("guess-indent").set_from_buffer(true) ]], false)
vim.api.nvim_exec([[ autocmd BufReadPost * :silent GuessIndent ]], false) My weird workaround is: vim.api.nvim_create_autocmd("VimEnter", {
group = vim.api.nvim_create_augroup("GuessIndent", { clear = true }),
command = "autocmd BufReadPost * :silent lua require('guess-indent').set_from_buffer(true)"
}) I have neovim |
Same here. Running
I don't know if it's my setup that's broken or not, but around 30 lines later nvim starts searching python ftplugins. Apparently, changing |
Just met the same issue. |
In my case, it seems like guess-indent settings were overridden by editorconfig, making nvim look like guess-indent wasn't executed. Once I disabled editorconfig or ensured that editorconfig was executed before guess-indent, the problem was solved. |
I think there are some problems behind local default_config = {
auto_cmd = false
}
vim.cmd([[ autocmd BufReadPost * :silent GuessIndent ]]) Then, everything is back to normal. |
I think this is fixed in #20 |
Hi,
Trying out this plugin with the config from the readme.
Sadly the autostart is not working. Even with
auto_cmd=true
.I need to manually call
GuessIndent
to get it work. :(Any idea? Do you need more info? Do i need to setup the plugin in an specific order?
The text was updated successfully, but these errors were encountered: