Giter Site home page Giter Site logo

Comments (3)

mjlbach avatar mjlbach commented on July 17, 2024

Weird, I can repro:

These lines I type drop

[ DEBUG ] 2021-07-22T08:40:27-0700 ] C:\tools\neovim\Neovim\share\nvim\runtime\lua\vim\lsp.lua:1035 ] "on_lines bufnr: 1, changedtick: 31, firstline: 2, lastline: 3, new_lastline: 3, old_byte_size: 1, old_utf32_size: 1, old_utf16_size: 1" { "d" }
[ DEBUG ] 2021-07-22T08:40:27-0700 ] ...ols\neovim\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:395 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 0, line = 2 }, start = { character = 0, line = 2 } }, rangeLength = 0, text = "d" } }, textDocument = { uri = "file:///C:/Users/michael/test/index.js", version = 31 } }}
[ DEBUG ] 2021-07-22T08:40:27-0700 ] C:\tools\neovim\Neovim\share\nvim\runtime\lua\vim\lsp.lua:1035 ] "on_lines bufnr: 1, changedtick: 32, firstline: 2, lastline: 3, new_lastline: 3, old_byte_size: 2, old_utf32_size: 2, old_utf16_size: 2" { "dr" }
[ DEBUG ] 2021-07-22T08:40:27-0700 ] ...ols\neovim\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:395 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 1, line = 2 }, start = { character = 1, line = 2 } }, rangeLength = 0, text = "r" } }, textDocument = { uri = "file:///C:/Users/michael/test/index.js", version = 32 } }}
[ DEBUG ] 2021-07-22T08:40:27-0700 ] C:\tools\neovim\Neovim\share\nvim\runtime\lua\vim\lsp.lua:1035 ] "on_lines bufnr: 1, changedtick: 33, firstline: 2, lastline: 3, new_lastline: 3, old_byte_size: 3, old_utf32_size: 3, old_utf16_size: 3" { "dro" }
[ DEBUG ] 2021-07-22T08:40:27-0700 ] ...ols\neovim\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:395 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 2, line = 2 }, start = { character = 2, line = 2 } }, rangeLength = 0, text = "o" } }, textDocument = { uri = "file:///C:/Users/michael/test/index.js", version = 33 } }}
[ DEBUG ] 2021-07-22T08:40:27-0700 ] C:\tools\neovim\Neovim\share\nvim\runtime\lua\vim\lsp.lua:1035 ] "on_lines bufnr: 1, changedtick: 34, firstline: 2, lastline: 3, new_lastline: 3, old_byte_size: 4, old_utf32_size: 4, old_utf16_size: 4" { "drop" }
[ DEBUG ] 2021-07-22T08:40:27-0700 ] ...ols\neovim\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:395 ] "rpc.send.payload" { jsonrpc = "2.0", method = "textDocument/didChange", params = { contentChanges = { { range = { end = { character = 3, line = 2 }, start = { character = 3, line = 2 } }, rangeLength = 0, text = "p" } }, textDocument = { uri = "file:///C:/Users/michael/test/index.js", version = 34 } }}

Here is the completion item resolve request

[ DEBUG ] 2021-07-22T08:40:27-0700 ] C:\tools\neovim\Neovim\share\nvim\runtime\lua\vim\lsp.lua:895 ] "LSP[tsserver]" "client.request" 1 "completionItem/resolve" { commitCharacters = { ".", ",", "(" }, data = { entryNames = { { name = "drop", source = "c:/Users/michael/test/node_modules/@types/lodash/index" } }, file = "c:\Users\michael\test\index.js", line = 3, offset = 2 }, insertTextFormat = 2, kind = 2, label = "drop", sortText = "�6"} <function 1> nil
[ DEBUG ] 2021-07-22T08:40:27-0700 ] ...ols\neovim\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:395 ] "rpc.send.payload" { id = 3, jsonrpc = "2.0", method = "completionItem/resolve", params = { commitCharacters = { ".", ",", "(" }, data = { entryNames = { { name = "drop", source = "c:/Users/michael/test/node_modules/@types/lodash/index" } }, file = "c:\Users\michael\test\index.js", line = 3, offset = 2 }, insertTextFormat = 2, kind = 2, label = "drop", sortText = "�6" }}

Here is the typescript completion code action

[ DEBUG ] 2021-07-22T08:40:27-0700 ] ...ols\neovim\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:496 ] "decoded" { id = 3, jsonrpc = "2.0", result = { command = { arguments = { "c:\Users\michael\test\index.js", { { changes = { { fileName = "c:/Users/michael/test/index.js", textChanges = { { end = { line = 1, offset = 22 }, newText = ", drop", start = { line = 1, offset = 22 } } } } }, description = "Add 'drop' to existing import declaration from "lodash"" } } }, command = "_typescript.applyCompletionCodeAction", title = "" }, commitCharacters = { ".", ",", "(" }, data = { entryNames = { { name = "drop", source = "c:/Users/michael/test/node_modules/@types/lodash/index" } }, file = "c:\Users\michael\test\index.js", line = 3, offset = 2 }, detail = "Auto import from 'lodash'\n(method) LoDashStatic.drop(array: List, n?: number): T[]", documentation = { kind = "markdown", value = "Creates a slice of array with n elements dropped from the beginning.\n\n*@param* array — The array to query. \n\n*@param* n — The number of elements to drop. \n\n*@return* — Returns the slice of array." }, insertTextFormat = 2, kind = 2, label = "drop", sortText = "�6" }}

I think this is all internally handled by compe (believe this is a custom tsserver extension), so I would maybe file an issue there.

from starter.nvim.

johans avatar johans commented on July 17, 2024

@mjlbach Thank you so much for the confirmation and investigation! I will try forwarding this on compe.

from starter.nvim.

mjlbach avatar mjlbach commented on July 17, 2024

(I know you saw this, posting for future reference)

Closing because this is an upsteram issue in theia (the wrapper around typescript server) typescript-language-server/typescript-language-server#135

from starter.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.