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: refactor module #1315

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

benlubas
Copy link
Contributor

@benlubas benlubas commented Feb 23, 2024

This is really messy commit history, please squash merge

Implements a very basic refactoring module in lua. This is a temporary solution while LSP is stalled.
Adds a link tools module that lets you parse links from a buffer in a convenient way. I made this its own module b/c it seemed like it might be useful

I honestly don't know if it's worth while to merge this, or just wait for everything else to be setup. I implemented this mostly just for fun

Features

:Neorg refactor rename file
:Neorg refactor rename heading

Two commands that will prompt for input, and ask the user for a new name.

  • Headings can change levels, and file can change directories.
  • uses buffer contents when they're available
  • uses TS to find links
  • links that use # keep their # even if the heading level changes

limitations

  • doesn't handle links in the current file that have a filepath that points to their own file (ie. {:path/to/foo:} in foo.norg is not handled)

@benlubas
Copy link
Contributor Author

benlubas commented May 6, 2024

This is ready for review and serious consideration now

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.

None yet

2 participants