clojure-lsp / clojure-lsp/clojure-lsp

Rename namespace alias with API / CLI

Open
#1,792 3 comments 2 reactions 0 assignees View on GitHub
API enhancement good first issue
Dominant language
Clojure
Stars
1.3k
Forks
180
Avg merge
13m
Merged PRs (30d)
4

Description

**Is your feature request related to a problem? Please describe.**

In the Editor integration I can point to a namespace alias and then rename it. But this feature is not exposed to the public API.

**Describe the solution you'd like**

***Option A:***

```clojure
(clojure-lsp.api/rename-ns-alias!
{:target-namespace 'clojure.string
:alias 'str })
```
Running this on the project, would unify the alias to `clojure.string` in all files.

***Option B:***

```clojure
(clojure-lsp.api/rename-ns-alias!
{:from 'clojure-string
:to 'str})
```

This would only match an existing alias `clojure-string` and rename it, independent of the target namespace it points to.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.