File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,10 @@ Requirements
194194
195195*:NvimTreeGenerateOnAttach*
196196
197- Creates and opens a new file `/tmp/ my_on_attach.lua ` containing an
198- | nvim-tree.on_attach | function based on your | nvim-tree.view.mappings | ,
199- | nvim-tree.remove_keymaps | as well as the defaults.
197+ Creates and opens a new file `nvim- tree- on - attach.lua ` in | stdpath | `" cache" ` ,
198+ usually `$XDG_CACHE_HOME /nvim` . Contains | nvim-tree.on_attach | function based
199+ on your | nvim-tree.view.mappings | , | nvim-tree.remove_keymaps | as well as the
200+ defaults.
200201 See https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach
201202
202203==============================================================================
@@ -1219,7 +1220,8 @@ In the event of a problem please disable the experiment and raise an issue.
12191220Configuration for diagnostic logging.
12201221
12211222 *nvim-tree.log.enable*
1222- Enable logging to a file `$XDG_CACHE_HOME /nvim/ nvim- tree.log `
1223+ Enable logging to a file `nvim- tree.log ` in | stdpath | `" cache" ` , usually
1224+ `$XDG_CACHE_HOME /nvim`
12231225 Type: `boolean ` , Default: `false`
12241226
12251227 *nvim-tree.log.truncate*
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ local api = require "nvim-tree.api"
22local open_file = require " nvim-tree.actions.node.open-file"
33local keymap = require " nvim-tree.keymap"
44local notify = require " nvim-tree.notify"
5+ local utils = require " nvim-tree.utils"
56
67local M = {
78 -- only populated when legacy mappings active
@@ -401,7 +402,7 @@ function M.cmd_generate_on_attach()
401402 return
402403 end
403404
404- local name = " /tmp/my_on_attach .lua"
405+ local name = utils . path_join { vim . fn . stdpath " cache " , " nvim-tree-on-attach .lua" }
405406 local file = io.output (name )
406407 io.write (M .on_attach_lua )
407408 io.close (file )
You can’t perform that action at this time.
0 commit comments