Skip to content

Commit c3b7be8

Browse files
authored
add .luarc.json for lua-language-server and fix a couple of nits (#1296)
1 parent e482bad commit c3b7be8

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

.luarc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
3+
"diagnostics": {
4+
"globals": {
5+
"vim": true
6+
},
7+
"disable": {
8+
"lowercase-global": true,
9+
"missing-parameter": true
10+
}
11+
}
12+
}
13+

lua/nvim-tree/diagnostics.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ local function from_coc()
9292

9393
for bufname, severity_list in pairs(diagnostics) do
9494
if not buffer_severity[bufname] then
95-
local severity = math.min(unpack(severity_list))
95+
local severity = math.min(table.unpack(severity_list))
9696
buffer_severity[bufname] = severity
9797
end
9898
end

lua/nvim-tree/explorer/explore.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ local function populate_children(handle, cwd, node, status)
3232
then
3333
local child = nil
3434
if t == "directory" and uv.fs_access(abs, "R") then
35-
child = builders.folder(node, abs, name, status, node_ignored)
35+
child = builders.folder(node, abs, name)
3636
elseif t == "file" then
37-
child = builders.file(node, abs, name, status, node_ignored)
37+
child = builders.file(node, abs, name)
3838
elseif t == "link" then
39-
local link = builders.link(node, abs, name, status, node_ignored)
39+
local link = builders.link(node, abs, name)
4040
if link.link_to ~= nil then
4141
child = link
4242
end

lua/nvim-tree/explorer/reload.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ function M.reload(node, status)
4848
child_names[abs] = true
4949
if not nodes_by_path[abs] then
5050
if t == "directory" and uv.fs_access(abs, "R") then
51-
table.insert(node.nodes, builders.folder(node, abs, name, status, node_ignored))
51+
table.insert(node.nodes, builders.folder(node, abs, name))
5252
elseif t == "file" then
53-
table.insert(node.nodes, builders.file(node, abs, name, status, node_ignored))
53+
table.insert(node.nodes, builders.file(node, abs, name))
5454
elseif t == "link" then
55-
local link = builders.link(node, abs, name, status, node_ignored)
55+
local link = builders.link(node, abs, name)
5656
if link.link_to ~= nil then
5757
table.insert(node.nodes, link)
5858
end

0 commit comments

Comments
 (0)