Skip to content

Commit 096d8f8

Browse files
committed
fix: don't attach lsp to buffer with empty path
1 parent 271eec9 commit 096d8f8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/flutter-tools/lsp/init.lua

+2
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ end
181181

182182
--- Checks if buffer path is valid for attaching LSP
183183
local function is_valid_path(buffer_path)
184+
if buffer_path == "" then return false end
185+
184186
local start_index, _, uri_prefix = buffer_path:find("^(%w+://).*")
185187
-- Do not attach LSP if file URI prefix is not file.
186188
-- For example LSP will not be attached for diffview:// or fugitive:// buffers.

0 commit comments

Comments
 (0)