Skip to content

Conversation

AntoineGS
Copy link
Collaborator

@AntoineGS AntoineGS commented Mar 18, 2025

Ability to change the root directory dynamically through a function (it can also be a string though that's less useful), with the following default:

  root_dir = function()
    return vim.fs.dirname(vim.fs.find(".git", { upward = true })[1])
  end,

Fixes #371
From the Readme:

root_dir

This allows changing the function that gets the root folder, the default looks for a parent folder that contains the folder .git.

language server now expects to be run directly through language-server.js
the configuration supports overriding the default function as get_root_dir
fixes zbirenbaum#371
@AntoineGS AntoineGS merged commit 25ab971 into zbirenbaum:master Mar 21, 2025
@AntoineGS AntoineGS deleted the dynamic_root_dir branch March 21, 2025 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change root_dir to allow function, like lspconfig.

1 participant