Skip to content

denols cannot be used for single typescript #4492

Description

@Decodetalkers

Description

root_dir = function(bufnr, on_dir)
-- The project root is where the LSP can be started from
local root_markers = { 'deno.lock', 'deno.json', 'deno.jsonc' }
-- Give the root markers equal priority by wrapping them in a table
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
or vim.list_extend(root_markers, { '.git' })
-- only include deno projects
local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' })
local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' })
local project_root = vim.fs.root(bufnr, root_markers)
if
(deno_lock_root and (not project_root or #deno_lock_root > #project_root))
or (deno_root and (not project_root or #deno_root >= #project_root))
then
-- deno config is closer than or equal to package manager lock,
-- or deno lock is closer than package manager lock. Attach at the project root,
-- or deno lock or deno config path. At least one of these is always set at this point.
on_dir(project_root or deno_lock_root or deno_root)
end
end,

I just check the code, find now denols require always be used for a project dir, and nowadays we can also not control the root_marks, I wonder if it is by design

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions