lukas-reineke / indent-blankline.nvim

Indent guides for Neovim
MIT License
4.19k stars 104 forks source link

Indents showing anyway at dashboard #644

Closed rwxmad closed 1 year ago

rwxmad commented 1 year ago

Problem

Indents showing anyway at dashboard Screenshot 2023-09-28 at 14 34 45

Plugins section:

  {
    'lukas-reineke/indent-blankline.nvim',
    main = 'ibl',
    config = function()
      require('rwxmad.config.indent-line')
    end,
  },

Configuration file:

require('ibl').setup({
  buftype_exclude = {
    'nofile',
    'terminal',
  },
  filetype_exclude = {
    'help',
    'startify',
    'aerial',
    'alpha',
    'dashboard',
    'packer',
    'neogitstatus',
    'NvimTree',
    'neo-tree',
    'Trouble',
  },
  context_patterns = {
    'class',
    'return',
    'function',
    'method',
    '^if',
    '^while',
    'jsx_element',
    '^for',
    '^object',
    '^table',
    'block',
    'arguments',
    'if_statement',
    'else_clause',
    'jsx_element',
    'jsx_self_closing_element',
    'try_statement',
    'catch_clause',
    'import_statement',
    'operation_type',
  },
  show_trailing_blankline_indent = false,
  use_treesitter = true,
  char = '▏',
  context_char = '▏',
  show_current_context = true,
  use_treesitter_scope = true,
})

Steps to reproduce

nvim

Expected behavior

So that the indents specified in the filetype_exclude are not shown

Neovim version (nvim -v)

v0.10.0-dev-772+g0211f889b

tigion commented 1 year ago

Look here: Migrate to version 3

:help ibl.config.exclude

dlnicoz commented 1 year ago

if you find solution plzz share config again !

tigion commented 1 year ago
-- v3
exclude = {
  filetypes = {
    "dashboard",
  },
},
-- v2
filetype_exclude = {
  "dashboard",
},
lukas-reineke commented 1 year ago

This is covered in the migration guide, please read it

dlnicoz commented 1 year ago

i get rid of dashboard but not this nerdtree could plzz help @lukas-reineke !! Screenshot_20230928_201052

lukas-reineke commented 1 year ago

but not this nerdtree

This is nvim-tree, not nerdtree.

Did you read the migration guide? It says

g:indent_blankline_filetype_exclude is now :help ibl.config.exclude.filetypes

So you need to take the filetypes you had under filetype_exclude, and put them under exclude.filetypes, just like with dashboard.

rwxmad commented 1 year ago

@lukas-reineke Does the new version still include additional parameters? or do you need some kind of field for them?

require('ibl').setup({
  exclude = {
    filetypes = {
      'help',
      'startify',
      'aerial',
      'alpha',
      'dashboard',
      'packer',
      'neogitstatus',
      'NvimTree',
      'neo-tree',
      'Trouble',
    },
    buftypes = {
      'nofile',
      'terminal',
    },
  },
  show_trailing_blankline_indent = false,
  use_treesitter = true,
  show_current_context = true,
  use_treesitter_scope = true,
})
lukas-reineke commented 1 year ago

please read the migration guide and the documentation, show_trailing_blankline_indent, use_treesitter, show_current_context, and use_treesitter_scope are all not valid anymore