Skip to content

Commit

Permalink
fix #189
Browse files Browse the repository at this point in the history
  • Loading branch information
cars10 committed Jan 11, 2024
1 parent aea809f commit 147731d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.0.3

* dont automatically open autocomplete, press `ctrl+space` to open, fixes [#189][i189]

[i189]: https://github.com/cars10/elasticvue/issues/189

## 1.0.2

* fixes issue with old versions of elasticsearch that do not provide a uuid, fixes [#182][i182]
Expand Down
2 changes: 1 addition & 1 deletion src/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const queryKeywords = [
'fields', 'type',
'filter', 'boost',
'operator', 'cutoff_frequency', 'bool', 'must', 'should', 'term', 'terms', 'prefix',
'query', 'match', 'match_phrase', 'range', 'gte', 'lte',
'query', 'query_string', 'match', 'match_phrase', 'range', 'gte', 'lte',
'_source'
]

Expand Down
2 changes: 2 additions & 0 deletions src/composables/CodeEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import { queryKeywords, queryValues } from '../autocomplete.ts'
*/
const completions = (context: any) => {
const word = context.matchBefore(/\w*/)
if (!context.explicit) return null

const nodeBefore = syntaxTree(context.state).resolveInner(context.pos, -1)
if (nodeBefore.name === 'Property') {
return {
Expand Down

0 comments on commit 147731d

Please sign in to comment.