Skip to content

Commit

Permalink
Adjust backend names.
Browse files Browse the repository at this point in the history
  • Loading branch information
manateelazycat committed Aug 7, 2023
1 parent bb9f064 commit b980ab2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/search_file_words.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def search_words_from_files(self, prefix: str):

candidates = list(map(lambda word: prefix[:-len(search_prefix)] + word, candidates))

eval_in_emacs("lsp-bridge-search-backend--record-items", "file-words", candidates[:min(self.max_number, len(candidates))])
eval_in_emacs("lsp-bridge-search-backend--record-items", "search-file-words", candidates[:min(self.max_number, len(candidates))])
except:
logger.error(traceback.format_exc())

Expand Down
2 changes: 1 addition & 1 deletion core/search_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def search_symbols(self, filename: str, prefix: str, ticker: int):
break

if ticker == self.search_ticker:
eval_in_emacs("lsp-bridge-search-backend--record-items", "paths", sorted(candidates, key=functools.cmp_to_key(lambda a, b: self.sort_files(prefix, a, b))))
eval_in_emacs("lsp-bridge-search-backend--record-items", "path", sorted(candidates, key=functools.cmp_to_key(lambda a, b: self.sort_files(prefix, a, b))))

def sort_files(self, prefix, file_a, file_b):
file_a_starts_with_prefix = file_a["key"].startswith(prefix)
Expand Down
2 changes: 1 addition & 1 deletion core/search_sdcv_words.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,5 @@ def search_words(self, prefix: str, ticker: int):
break

if ticker == self.search_ticker:
eval_in_emacs("lsp-bridge-search-backend--record-items", "sdcv-words",
eval_in_emacs("lsp-bridge-search-backend--record-items", "search-sdcv-words",
sorted(candidates, key=functools.cmp_to_key(lambda a, b: self.sort_words(prefix, a, b))))
7 changes: 3 additions & 4 deletions lsp-bridge.el
Original file line number Diff line number Diff line change
Expand Up @@ -2259,10 +2259,10 @@ We need exclude `markdown-code-fontification:*' buffer in `lsp-bridge-monitor-be
("copilot"
(setq-local acm-backend-copilot-items items)
(setq-local acm-backend-copilot-cache-candiates nil))
("file-words"
("search-file-words"
(setq-local acm-backend-search-file-words-items items)
(setq-local acm-backend-search-file-words-cache-candiates nil))
("sdcv-words"
("search-sdcv-words"
(setq-local acm-backend-search-sdcv-words-items items)
(setq-local acm-backend-search-sdcv-words-cache-candiates nil))
("tabnine"
Expand All @@ -2271,12 +2271,11 @@ We need exclude `markdown-code-fontification:*' buffer in `lsp-bridge-monitor-be
("tailwind"
(setq-local acm-backend-tailwind-items items)
(setq-local acm-backend-tailwind-cache-candiates nil))
("paths"
("path"
(setq-local acm-backend-path-items items)
(setq-local acm-backend-path-cache-candiates nil)))
(lsp-bridge-try-completion))


;;; support which-func-mode
;;;

Expand Down

0 comments on commit b980ab2

Please sign in to comment.