ty icon indicating copy to clipboard operation
ty copied to clipboard

Consider adding server setting to provide configuration file

Open kkpattern opened this issue 6 months ago • 4 comments

Since ty now supports the --config-file flag, we can add this flag to the server command. This would greatly benefit users running ty server within a monorepo.

kkpattern avatar Jul 09 '25 07:07 kkpattern

Thanks for the request!

I agree that it'll be useful to have something similar to --config-file for the server but it shouldn't be a command-line flag. This is because starting a language server is mostly done by the editor and is not something a user would do quite often. So, this kind of configuration should be exposed as server setting. I'll be working on that soon (#82) after which we can start including certain settings that the user can set directly in their editor.

I'm going to convert this issue in a way to capture what I've said above and make it a sub-issue for client settings.

dhruvmanila avatar Jul 09 '25 08:07 dhruvmanila

I've added needs-decision because it might be useful to first discuss whether something like this is useful to add. For context, Ruff provides this option: https://docs.astral.sh/ruff/editors/settings/#configuration.

dhruvmanila avatar Jul 09 '25 08:07 dhruvmanila

I would like to add right now it is impossible to use the ty vscode extension in a monorepo setup. More info here: https://github.com/astral-sh/ty/issues/2034#issue-3740386726

I also want to point out that the ruff extension is able to work in a monorepo (and it doesn't even have an option in the extension to specify a config file, it finds it automatically and just works)

Some feature parity between ty and ruff here would be nice

ColemanDunn avatar Dec 18 '25 17:12 ColemanDunn

I should have a PR for this any minute.

MichaReiser avatar Dec 18 '25 17:12 MichaReiser