craftzdog / dotfiles-public

My personal dotfiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

some plugin not working

ryannewcomer opened this issue · comments

compress-video-coding-snippet-not-work.mp4

as you can see in this small video(30s), my snippet isn't working. how to fix it?

i add a plugin call nvim-tree and i config them like this:

local status, nvim_tree = pcall(require, 'nvim-tree');

if (not status) then return end


nvim_tree.setup({
  sort_by = "case_sensitive",
  view = {
    adaptive_size = true,
    mappings = {
      list = {
        { key = "u", action = "dir_up" },
      }
    }
  },
  renderer = {
    group_empty = true,
  },
  filters = {
    dotfiles = true,
  },
  diagnostics = {
    enable = true,
    show_on_dirs = false,
    debounce_delay = 50,
    icons = {
      hint = "´ü¬",
      info = "´üÜ",
      warning = "´ü▒",
      error = "´üù",
    },
  }
})

i am on window 11 on kail linux wsl

as you can see in this small video(30s), my snippet isn't working. how to fix it?

i add a plugin call nvim-tree and i config them like this:

local status, nvim_tree = pcall(require, 'nvim-tree');

if (not status) then return end


nvim_tree.setup({
  sort_by = "case_sensitive",
  view = {
    adaptive_size = true,
    mappings = {
      list = {
        { key = "u", action = "dir_up" },
      }
    }
  },
  renderer = {
    group_empty = true,
  },
  filters = {
    dotfiles = true,
  },
  diagnostics = {
    enable = true,
    show_on_dirs = false,
    debounce_delay = 50,
    icons = {
      hint = "´ü¬",
      info = "´üÜ",
      warning = "´ü▒",
      error = "´üù",
    },
  }
})

i am on window 11 on kail linux wsl

What version of nvim are you using?

base on the documentation here_in_this_link

Screenshot from 2023-02-22 22-32-54

make sure you added this in your packer setup:

  use({
    "nvim-tree/nvim-tree.lua",
    requires = {
      "nvim-tree/nvim-web-devicons", -- optional, for file icons
    },
    tag = "nightly", -- optional, updated every week. (see issue #1193)
  })

here's my current setup that works for me:

local setup, nvimtree = pcall(require, "nvim-tree")
if not setup then
  return
end

-- recommended settings from nvim-tree documentation
vim.g.loaded = 1
vim.g.loaded_netrwPlugin = 1

vim.opt.termguicolors = true

local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config")
if not config_status_ok then
  return
end

local tree_cb = nvim_tree_config.nvim_tree_callback

nvimtree.setup({
  update_focused_file = {
    enable = true,
    update_cwd = true,
  },
  renderer = {
    root_folder_modifier = ":t",
    icons = {
      glyphs = {
        default = "",
        symlink = "",
        folder = {
          arrow_open = "",
          arrow_closed = "",
          default = "",
          open = "",
          empty = "",
          empty_open = "",
          symlink = "",
          symlink_open = "",
        },
        git = {
          unstaged = "",
          staged = "S",
          unmerged = "",
          renamed = "",
          untracked = "U",
          deleted = "",
          ignored = "",
        },
      },
    },
  },
  git = {
    enable = true,
    ignore = false,
    show_on_dirs = true,
    show_on_open_dirs = true,
  },
  filters = {
    dotfiles = false,
  },
  diagnostics = {
    enable = true,
    show_on_dirs = true,
    icons = {
      hint = "",
      info = "",
      warning = "",
      error = "",
    },
  },
  view = {
    width = 30,
    side = "left",
    mappings = {
      list = {
        { key = { "l", "<CR>", "o" }, cb = tree_cb("edit") },
        { key = "h", cb = tree_cb("close_node") },
        { key = "v", cb = tree_cb("vsplit") },
      },
    },
  },
})

take what you will.