Skip to content
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

Mini.Indentscope disabled by Alpha config while opening file directly #199

Closed
3 tasks done
Shinzu opened this issue Feb 7, 2023 · 5 comments · Fixed by #186
Closed
3 tasks done

Mini.Indentscope disabled by Alpha config while opening file directly #199

Shinzu opened this issue Feb 7, 2023 · 5 comments · Fixed by #186
Labels
bug Something isn't working

Comments

@Shinzu
Copy link

Shinzu commented Feb 7, 2023

Did you check docs and existing issues?

  • I have read all the LazyVim docs
  • I have searched the existing issues of LazyVim
  • I have searched the exsiting issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.0-dev

Operating system/version

Ubuntu 18.04

Describe the bug

In

vim.b.miniindentscope_disable = true
miniindentscope seems to be disabled "globally" when open a file directly with nvim <filename>. While open a over the alpha dashboard mini.indentscope is enabled correctly.

related issue in mini echasnovski/mini.nvim#220

Steps To Reproduce

  1. open file directly via nvim <filename>
  2. indentscope is disabled
  3. open file over alpha
  4. indentscope is working

Expected Behavior

indentscope is working also while opening file directly

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "folke/LazyVim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@Shinzu Shinzu added the bug Something isn't working label Feb 7, 2023
@loiccoyle
Copy link

I can reproduce, removing the line at

vim.b.miniindentscope_disable = true

fixes the issue, what was the reason for it in the first place?

@folke
Copy link
Collaborator

folke commented Feb 7, 2023

@loiccoyle that is to disable miniindentscope on the alpha dashboard. I'll change it in another way

@folke
Copy link
Collaborator

folke commented Feb 7, 2023

It actually is already taken care of, so that can just be deleted :)

Will push a new release in a bit

@loiccoyle
Copy link

loiccoyle commented Feb 7, 2023

@loiccoyle that is to disable miniindentscope on the alpha dashboard. I'll change it in another way

Yeah I thought so but unless there is some quirk with my setup, nothing changes on the alpha dashboard with or without it. There is no visible indentscope highlighting either way.

@folke
Copy link
Collaborator

folke commented Feb 7, 2023

Yep, exactly. The code below already took care of that. I probably added that in the alpha config block before I added the autocmd.

vim.api.nvim_create_autocmd("FileType", {
pattern = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy", "mason" },
callback = function()
vim.b.miniindentscope_disable = true
end,
})

ofrades pushed a commit to ofrades/LazyVim that referenced this issue May 30, 2023
joshmedeski pushed a commit to joshmedeski/LazyVim that referenced this issue Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants