Open twlz0ne opened 1 year ago
But if there is a space after the cursor or any character after the }
completion will work, for example:
puts "hello, #{na| }"
# or
puts "hello, #{na|}a"
eglot logs:
[client-notification] Wed Mar 15 14:15:06 2023:
(:jsonrpc "2.0" :method "textDocument/didChange" :params
(:textDocument
(:uri "file:///Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb" :version 15)
:contentChanges
[(:range
(:start
(:line 11 :character 17)
:end
(:line 11 :character 17))
:rangeLength 0 :text "m")]))
[client-request] (id:54) Wed Mar 15 14:15:06 2023:
(:jsonrpc "2.0" :id 54 :method "textDocument/completion" :params
(:textDocument
(:uri "file:///Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb")
:position
(:line 11 :character 18)
:context
(:triggerKind 1)))
[server-reply] (id:54) Wed Mar 15 14:15:06 2023:
(:jsonrpc "2.0" :id 54 :result
(:isIncomplete :json-false :items
[(:label "name1" :kind 6 :detail nil :data
(:path nil :return_type "undefined" :location
(:filename "/Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb" :range
(:start
(:line 9 :character 0)
:end
(:line 9 :character 11)))
:deprecated :json-false :uri "file:///Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb")
:textEdit
(:range
(:start
(:line 11 :character 15)
:end
(:line 11 :character 18))
:newText "name1")
:sortText "0000name1")
(:label "name2" :kind 6 :detail nil :data
(:path nil :return_type "undefined" :location
(:filename "/Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb" :range
(:start
(:line 10 :character 0)
:end
(:line 10 :character 11)))
:deprecated :json-false :uri "file:///Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb")
:textEdit
(:range
(:start
(:line 11 :character 15)
:end
(:line 11 :character 18))
:newText "name2")
:sortText "0000name2")
(:label "NameError" :kind 7 :detail "=> Class<NameError>" :data
(:path "NameError" :return_type "Class<NameError>" :location nil :deprecated :json-false :uri "file:///Volumes/HDD/Users/gqj/Downloads/test_rb/tes\
t_dict.rb")
:textEdit
(:range
(:start
(:line 11 :character 15)
:end
(:line 11 :character 18))
:newText "NameError")
:sortText "0001NameError")]))
[client-request] (id:55) Wed Mar 15 14:15:06 2023:
(:jsonrpc "2.0" :id 55 :method "completionItem/resolve" :params
(:label
#("name1" 0 1
(eglot--lsp-item #1))
:kind 6 :detail nil :data
(:path nil :return_type "undefined" :location
(:filename "/Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb" :range
(:start
(:line 9 :character 0)
:end
(:line 9 :character 11)))
:deprecated :json-false :uri "file:///Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb")
:textEdit
(:range
(:start
(:line 11 :character 15)
:end
(:line 11 :character 18))
:newText "name1")
:sortText "0000name1"))
[server-reply] (id:55) Wed Mar 15 14:15:06 2023:
(:jsonrpc "2.0" :id 55 :result
(:label "name1" :kind 6 :detail "=~ String" :data
(:path nil :return_type "undefined" :location
(:filename "/Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb" :range
(:start
(:line 9 :character 0)
:end
(:line 9 :character 11)))
:deprecated :json-false :uri "file:///Volumes/HDD/Users/gqj/Downloads/test_rb/test_dict.rb")
:textEdit
(:range
(:start
(:line 11 :character 15)
:end
(:line 11 :character 18))
:newText "name1")
:sortText "0000name1" :documentation
(:kind "markdown" :value "String")))
Steps to reproduce
|
represent the cursor)m
to trigger completionActual behaviour
Complete nothing.
Expect behaviour
Complete variables.
Enviroment
eglot logs