Skip to content

Conversation

@DaniloDjokic
Copy link
Collaborator

Allow users to optionally set commands on a directory/project level.

This will allow the program to work as expected when the buffer with the proper extension is not currently open as well as allow users to setup specific commands for heterogeneous projects (Hugo for example).

Expose a new project_override_config field inside the config with Lua tables for each individual directory.

The code will check if the current buffer matches any of the specified directory roots and if so it will execute the provided command with the current mechanism.
If a directory root is set but a command is not, it will print the proper error message.

If a directory root is not found for the current buffer it will fallback to the extensions configuration.

Note. I've also updated stylua.toml according to the readme from the official repo as none-ls was not working with the provided one.

@karshPrime
Copy link
Owner

Oh a real useful enhancement, cheers for the update! I tried it locally, and it works as intended.

Merging it.

@karshPrime karshPrime merged commit 39a9b4b into karshPrime:main Jan 22, 2025
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