Skip to content

Commit

Permalink
fmt code
Browse files Browse the repository at this point in the history
  • Loading branch information
He1pa committed Feb 28, 2024
1 parent d292a1e commit 068dc71
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kclvm/tools/src/LSP/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ use kclvm_sema::resolver::doc::{parse_doc_string, Doc};
use kclvm_sema::ty::{FunctionType, SchemaType, Type};
use lsp_types::{CompletionItem, CompletionItemKind, InsertTextFormat};

use crate::util::{get_real_path_from_external, is_in_schema_expr};
use crate::util::is_in_docstring;
use crate::util::{get_real_path_from_external, is_in_schema_expr};

#[derive(Debug, Clone, PartialEq, Hash, Eq)]
pub enum KCLCompletionItemKind {
Expand Down Expand Up @@ -233,14 +233,15 @@ fn completion_dot(
// look_up_exact_symbol
let mut def = find_def_with_gs(&pre_pos, gs, true);
if def.is_none() {
// handel `symbol?.`
// handle `symbol?.`, find exact symbol from position of `l`
let pre_pos = KCLPos {
filename: pos.filename.clone(),
line: pos.line,
column: pos.column.map(|c| c - 2),
};
def = find_def_with_gs(&pre_pos, gs, true);
}

match def {
Some(def_ref) => {
if let Some(def) = gs.get_symbols().get_symbol(def_ref) {
Expand Down

0 comments on commit 068dc71

Please sign in to comment.