Comments (1)
this loooks like a rust-analyzer bug. Lsp has two modes of returning completion edits: One simple mode where the lsp has to figure out what text to replace and an explicit mode where the lsp specifies the range.
RA always uses the explicit mode and all the setting does is switch between the two edits. In this case the edit RA provides is simply off by one so it's an off by one bug in rust-analyzer not in helix. Particularly these completions inside derive macros are new so I am not too surprised. It may also be a RA limitation since sered uses string literals.
A better case is you start with a file where the word is partially already written out and enter insertmode (so entirely new completion).
use chrono::serde::ts_milliseconds;
use chrono::{DateTime, Utc};
use serde::Deserialize;
#[derive(Deserialize)]
struct A {
#[serde(with = "ts_mill")]
time: DateTime<Utc>,
}
fn main() {
println!("Hello, world!");
}
it completes ts_milliseconds
and you endup with ts_millts_milliseconds
. This has nothing to do with complteon replace btw. Completion replace is about the remainedr of the word (to the right) not about keeping prefixes around (that would be stupid). Both the insert and replace completion text edit returned by RA are identical and don't replace any text.
from helix.
Related Issues (20)
- Soft-hyphen character breaks render and movement HOT 1
- failed to build HOT 1
- Display LSP provider information in diagnostics
- Allow customizing lsp gutter symbols
- Allow to disable themes background HOT 1
- File autocomplete in :open breaks with symlinks HOT 1
- `CTRL+c` causes Helix to crash after Nushell LSP crashes HOT 1
- Space / global search feature is broken HOT 3
- Weird behaviour: sometimes 'normal' parts of Latex code get highlighted as warning.
- support multiple root directories for file picker HOT 4
- Extremely slow python autocomplete performance HOT 3
- Display recent files at the top of file picker HOT 2
- Auto-Complete adds double $ character after choosing a value from the dropdown menu
- lua-language-server exits on start
- Feature Request: Custom Snippet Support
- Enhancement: Custom Snippet Support HOT 1
- Clojure-lsp go to definition not working for dependencies/core library functions
- Insert cursor bar style
- sequences of commands interact poorly with interactive commands in mappings
- Crash when trying to debug: "no entry found for key" 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 helix.