* fix(#2157): use stdpath cache for my_on_attach.lua * fix(#2157): my_on_attach.lua -> nvim-tree-on-attach.lua
This commit is contained in:
committed by
GitHub
parent
d68b00a63e
commit
13c714681f
@@ -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
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user