elixir-tools / elixir-tools.nvim

Neovim plugin for Elixir
MIT License
395 stars 29 forks source link

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

Closed dkarter closed 9 hours ago

dkarter commented 4 days ago

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:

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)

https://github.com/elixir-tools/elixir-tools.nvim/assets/551858/3864070b-a20c-42ea-b17b-e4b888c7ad92

dkarter commented 4 days ago

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 ;) https://github.com/lewis6991/nvim-test/commit/94b485af0c63719097be95d3ef099f078b1be668

mhanberg commented 3 days ago

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 commented 3 days ago

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 commented 9 hours ago

Nice work, thanks!