Skip to content

feat(projectionist): allow disabling the projectionist integration #221

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

Merged

Conversation

dkarter
Copy link
Contributor

@dkarter dkarter commented Jul 6, 2024

Motivation

Why are we considering this change

Some projects are structured differently (I inherited a codebase that doesn't follow community conventions regarding directory structure).
If I try to overwrite the projectionist_heuristics, and the plugin is loaded after my changes, it wipes them out.

It would be great if there was a way to disable the projectionist integration for those of us who need to extend it.

Summary of Changes

A high level summary of what changed, including any important notes the reviewer should know

Main changes:

  • adds a new user setting for disabling the projectionist integration
    • This change leaves the existing behavior of enabling it by default to prevent a breaking change for users.

Ancillary changes:

Testing Instructions / Screenshots

How can we confirm this PR is working as intended? Include any setup steps necessary

Setup elixir-tools.nvim with:

require("elixir").setup({
  projectionist = {enable = false},
})

Check that projections were not loaded by inspecting vim.g.projectionist_heuristics:

vim.inspect(vim.g.projectionist_heuristics)
CleanShot.2024-07-06.at.00.28.58.mp4

@dkarter dkarter force-pushed the feat/allow-disabling-projectionist branch from cce849b to 5ebbecd Compare July 6, 2024 05:28
@dkarter dkarter marked this pull request as ready for review July 6, 2024 05:33
@dkarter
Copy link
Contributor Author

dkarter commented Jul 6, 2024

Not sure what's up with the legacy tests, doesn't seem related to my changes.

I did however fix the just test command, it was broken due to changes in nvim-test ;) lewis6991/nvim-test@94b485a

@mhanberg
Copy link
Collaborator

mhanberg commented Jul 6, 2024

Awesome, thanks!

I think we can also fix the overriding by changing the option in the projectionist file that manages how the merge works. I think changing from "force" to "keep" should do the trick.

@dkarter
Copy link
Contributor Author

dkarter commented Jul 7, 2024

Awesome, thanks!

I think we can also fix the overriding by changing the option in the projectionist file that manages how the merge works. I think changing from "force" to "keep" should do the trick.

Great idea! Implemented in 6e7a997

@mhanberg mhanberg merged commit 057f6e5 into elixir-tools:main Jul 10, 2024
6 of 12 checks passed
@mhanberg
Copy link
Collaborator

Nice work, thanks!

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