Comments (6)
I agree, lots of situations where you copy and paste code and need to add imports, rather than typing the code and tab completing
from gleam.
I think it could still be useful to have a code action for when you did not use the autocompletion, though not as high a priority.
from gleam.
See the following example:
pub fn main() {
io.print("Hello world")
}
I haven't imported gleam/io
yet and that's why I receive the "Unknown module" error.
I'd like to go with my cursor over the io
and have a code action to import it from gleam/io
or other module suggestions.
from gleam.
I think that's the error for when you have imported a module but there is no module with that name. Would it be a code action that edits the import to the one that exists with the closest name?
from gleam.
Should this be quite straightforward now that we have this? #3219
from gleam.
I'd like to go with my cursor over the
io
and have a code action to import it fromgleam/io
or other module suggestions.
FWIW the behavior you are describing here is almost exactly what the new completion behavior is with #3219 though it still has that issue with duplicating the module name. That being said, once #3240 is merged I think this can be closed as completed
from gleam.
Related Issues (20)
- Error span differs between erlang and javascript for duplicate @external attributes HOT 2
- Target support not checked for unused unqualified imported values HOT 5
- Fatal compiler bug when compiling BitArray pattern to Erlang HOT 4
- Crash when adding cyclic import HOT 1
- Formatter doesn't break some lines longer than 80 characters HOT 1
- JavaScript variable redeclaration in single pattern case statement HOT 1
- LSP: auto-imports feature doesn't handle `_` well HOT 4
- module_info function name is not being escaped on erlang HOT 2
- Improve [..] syntax deprecation warning HOT 1
- Gleam version in default Github's test workflow does not match the gleam's version used to generate it HOT 3
- Can use private type in signature of public function when in a very specific directory HOT 3
- Print correct syntax for "Inexhaustive patterns" diagnostic, relative to current module
- LSP code action: import unknown module / type HOT 1
- LSP: Not starting in Neovim HOT 5
- Docs generator could show doc blocks of re-exported types just like the LSP does HOT 1
- Formatter moves doc comments around when surrounded by commented-out code HOT 2
- Formatter doesn't indent lists in cases with comments HOT 1
- gleam compiler seems confused when erlang module has the same name of gleam module HOT 2
- Function fault tolerance results in confusing errors when using labels and arity is incorrect HOT 2
- Gleam exits silently when erl doesn't work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gleam.