Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions doc/nvim-tree-lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ Requirements

*:NvimTreeGenerateOnAttach*

Creates and opens a new file `/tmp/my_on_attach.lua` containing an
|nvim-tree.on_attach| function based on your |nvim-tree.view.mappings|,
|nvim-tree.remove_keymaps| as well as the defaults.
Creates and opens a new file `nvim-tree-on-attach.lua` in |stdpath| `"cache"`,
usually `$XDG_CACHE_HOME/nvim`. Contains |nvim-tree.on_attach| function based
on your |nvim-tree.view.mappings|, |nvim-tree.remove_keymaps| as well as the
defaults.
See https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach

==============================================================================
Expand Down Expand Up @@ -1219,7 +1220,8 @@ In the event of a problem please disable the experiment and raise an issue.
Configuration for diagnostic logging.

*nvim-tree.log.enable*
Enable logging to a file `$XDG_CACHE_HOME/nvim/nvim-tree.log`
Enable logging to a file `nvim-tree.log` in |stdpath| `"cache"`, usually
`$XDG_CACHE_HOME/nvim`
Type: `boolean`, Default: `false`

*nvim-tree.log.truncate*
Expand Down
3 changes: 2 additions & 1 deletion lua/nvim-tree/keymap-legacy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local api = require "nvim-tree.api"
local open_file = require "nvim-tree.actions.node.open-file"
local keymap = require "nvim-tree.keymap"
local notify = require "nvim-tree.notify"
local utils = require "nvim-tree.utils"

local M = {
-- only populated when legacy mappings active
Expand Down Expand Up @@ -401,7 +402,7 @@ function M.cmd_generate_on_attach()
return
end

local name = "/tmp/my_on_attach.lua"
local name = utils.path_join { vim.fn.stdpath "cache", "nvim-tree-on-attach.lua" }
local file = io.output(name)
io.write(M.on_attach_lua)
io.close(file)
Expand Down