Skip to content

Tricks in nvim

lua in nvim

start up of nvim

nvim doc

lazy.nvim

ref lazy.nvim 配置的表合并情况。例如假设treesitter的默认配置为

return {
  "nvim-treesitter/nvim-treesitter",
  opts = {
    ensure_installed = { "lua", "vim" },
    highlight = {
      enable = true,
    },
  },
}

手动配置

return {
  "nvim-treesitter/nvim-treesitter",
  opts = {
    ensure_installed = { "python" },
    highlight = {
      enable = false,
    },
    indent = {
      enable = false,
    },
  },
}

那么最后会得到ensure_installed = { "python" }。如何要拓展表,则要用

table.insert(opts.ensure_installed, "python")