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)
- Prefixed ints require brackets to be negated HOT 1
- LSP: Show module docs when hovering a module HOT 6
- Lucy is not rotating on site HOT 1
- LSP: Add local variable suggestions HOT 1
- LSP: Goto Definition not working properly for unqualified imports HOT 2
- (hex)docs: types in function signatures should be clickable links to their documentation HOT 1
- Deprecate `..` discard if not preceded by a comma HOT 1
- Improve the error message for using module alias as a name HOT 2
- LSP code action: turn (wrong) C-style type definition into a single constructor type HOT 1
- Gleam package manager seems to default to oldest possible version instead of most recent HOT 1
- Language Server: Label access completion only works with public types
- `gleam export package-interface` breaks when build is cached HOT 1
- lsp crash HOT 1
- gleam doesn't update, on AUR helper (yay) HOT 3
- Infer minimum Gleam version HOT 5
- Allow Strings in a BitArray literal without having to specify utf8 encoding HOT 3
- Print progress to stderr, not stdout HOT 3
- LSP: autocompleting type imports should add brackets if needed HOT 1
- string.drop_left appears to return array of ASCII codes in some circumstances HOT 2
- Inconsistency with tag name format expected for source links in docs based on repository type HOT 4
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.