Skip to content

Commit

Permalink
refactor: remove Windows lower case drive fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lopi-py committed Jan 5, 2025
1 parent 036c415 commit 5f9fcc1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 29 deletions.
2 changes: 1 addition & 1 deletion lua/luau-lsp/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ local function start_language_server()
local opts = vim.deepcopy(config.get().server) --[[@as vim.lsp.ClientConfig]]
opts.name = "luau-lsp"
opts.cmd = get_cmd()
opts.root_dir = util.lower_case_drive(opts.root_dir(bufname))
opts.root_dir = opts.root_dir(bufname)
opts.settings = vim.tbl_deep_extend("force", opts.settings or {}, get_settings())
opts.init_options = {
fflags = get_fflags(),
Expand Down
11 changes: 0 additions & 11 deletions lua/luau-lsp/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,4 @@ function M.get_client(bufnr)
return vim.lsp.get_clients({ name = "luau-lsp", bufnr = bufnr })[1]
end

--- TODO: remove when https://github.com/JohnnyMorganz/luau-lsp/issues/752 is fixed
---
---@param dir string?
---@return string?
function M.lower_case_drive(dir)
if M.is_windows and dir then
return dir:sub(1, 1):lower() .. dir:sub(2)
end
return dir
end

return M
17 changes: 0 additions & 17 deletions spec/windows_drive_spec.lua

This file was deleted.

0 comments on commit 5f9fcc1

Please sign in to comment.