just-lsp 0.2.8

A language server for just
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

pub trait PointExt {
  fn position(&self) -> lsp::Position;
}

impl PointExt for Point {
  fn position(&self) -> lsp::Position {
    lsp::Position {
      line: u32::try_from(self.row).expect("line index exceeds u32::MAX"),
      character: u32::try_from(self.column)
        .expect("column index exceeds u32::MAX"),
    }
  }
}