Comments (3)
Should that be done inside this repository as a separate workspace, or would you prefer having the language server in a separate repository completely? In terms of implementing the language server, I think using tower-lsp
and the tower-lsp-boilerplate
should offer the quickest way to get a functional language server. Are you ok with using a library like that to abstract the lower levels of the language server protocol?
from ante.
@ehllie I think a separate repository might be best. I'm absolutely in favor of using any libraries for the LSP to make things easier. You can take a look at https://github.com/jfecher/ante-lsp for a possible good starting point (and place to merge things into). It uses tower-lsp and was forked from the boilerplate repo. I haven't looked at it in a while though so I doubt it's in a working state.
from ante.
I've noticed a couple things that would need to be done for the language server to be effective:
- Make name resolution and type checking steps produce a list of errors, warnings and notes rather than printing them directly to stderr or panicking.
- Make the AST not require a lifetime parameter. The lifetime of AST being tied to the lifetime of the Path reference makes it awkward to work with in a language server context, since the filename is created from the request, which only lives inside the body of a function that receives it. If we want the AST to live longer in the cache it needs to take ownership of the path.
- Fix the
unsafe impl Send for ...
lines? They are marked with a comment sayingTODO: Remove
, and it's usually not the best idea to lie to the compiler 😛. Not sure how much of an issue it could be though.
from ante.
Related Issues (20)
- Improve Location for "type variable is already in scope" error
- Codegen crash when using a trait that defines multiple methods
- What kind of memory management does ante use? HOT 3
- Implement Named Constructor syntax HOT 2
- Adding type annotations to an unbound type variable can crash the compiler HOT 1
- Implement `can Effect` syntax for annotating effects HOT 1
- Check declared variable's types with equality instead of unification HOT 1
- Add a proper error message for unhandled effects
- Incorrect Pointer Offset Calculation When Using -O3 Optimization Level HOT 1
- Add shorthand for casting integer types
- Malloc Panics with -O0 or crane_lift HOT 1
- Require the package name to prefix all imports
- Add `./deps` as a relative root by default
- Add a command-line flag to configure the "relative_root" directories
- WebAssembly HOT 2
- Values declared inside conditional blocks and match arms leak to module export list HOT 2
- Monomorphisation panic HOT 3
- Implement effect variable ellision
- Panic: `Recursion limit reached in occurs`
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 ante.