Skip to content
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

feat: look for config-files in git-repos #137

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

Conversation

sivizius
Copy link

In my setup, I have workspaces for rather large projects that consist of multiple directories with multiple repositories. Without this change, typos-lsp/typos just looks for a config-file at the workspace-root and parent directories and thus will not find the relevant configuration files. With this change, it will first traverse any child-directory per workspace to find git-repositories (basically directories that contain a .git-directory or file). It will not traverse further by design.

Other repository-types can be added in follow-up PRs.
Please let me know, if a setting to enable/disable searching for repositories is desired.

@tekumara
Copy link
Owner

One of the design goals of typos-lsp is to mimic the behaviour of typos ... do you think this deviates from how typos would handle the loading of config files?

@sivizius
Copy link
Author

I either manually run typos inside the actual working directory, usually a repository, run it as a pre-commit-hook or in a CI. All of these use case are on repository-level, not workspace-level. I wrote this change, because I kept getting warnings about typos which I disabled in a typos.toml, but they were not read, because I had multiple directories and repositories within a workspace, which annoyed me.

@tekumara
Copy link
Owner

tekumara commented Dec 3, 2024

I can see it's useful for your use-case, and that typos doesn't have a concept of workspace-level. That's an IDE concept - which IDE do you use?

Currently typos-lsp defaults to working as the cli would, if the cli ran in the workspace's directory.

@sivizius
Copy link
Author

which IDE do you use?

VS Codium

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