Skip to content

fix(mesonlsp): improved root detection #3775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SpikedPaladin
Copy link

This commit enhances root directory detection of mesonlsp language server.
Current behavior:
root is set on first meson file user is opened
New behavior:
root is set to parent of meson.build with project function call

@@ -3,8 +3,33 @@
--- https://github.com/JCWasmx86/mesonlsp
---
--- An unofficial, unendorsed language server for meson written in C++

local meson_matcher = function(_, path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring should give an example of the line this is trying to find. shouldn't have to study the code to figure that out.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what you mean, can you explain in more detail please?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
local meson_matcher = function(_, path)
--- Decides if a file is a meson file by looking for lines like:
--- "foo.bar" or "baz"
local meson_matcher = function(_, path)

replace "foo.bar" with an actual example

This commit enhances root directory detection of mesonlsp language
server.
Current behavior:
root is set on first meson file user is opened
New behavior:
root is set to parent of meson.build with project function call
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.

2 participants