neovim/runtime
Lajos Koszti f6329ea137
fix(lsp): correct prefix when filterText is present (#17051)
LSP server might return an item which would replace a token to another.
For example in typescript for a `jest.Mock` object `getProductsMock.`
text I get the following response:
```
{
    commitCharacters = {
        ".",
        ",",
        "("
    },
    data = {
        entryNames = {
            "Symbol"
        },
        file = "/foo/bar/baz.service.spec.ts",
        line = 268,
        offset = 17
    },
    filterText = ".Symbol",
    kind = 6,
    label = "Symbol",
    sortText = "11",
    textEdit = {
        newText = "[Symbol]",
        range = {
            end = {
                character = 16,
                line = 267
            },
            start = {
                character = 15,
                line = 267
            }
        }
    }
},
```

In `lsp.omnifunc` to get a `prefix` we call the `adjust_start_col` which
then returns the `textEdit.range.start.character`.
Th `prefix` then be the `.` character. Then when filter the items with
`remove_unmatch_completion_items`, every item will be filtered out,
since no completion word starts `.`.

To fix we return the `end.character`, which in that particular case will
be the position after the `.`.
2022-02-11 14:04:15 +01:00
..
autoload fix(healthcheck): handle empty reports 2022-02-09 10:18:22 +08:00
colors vim-patch:4f4d51a942cc 2021-05-01 14:22:52 -04:00
compiler vim-patch:6c391a74fe90 (#15654) 2021-09-13 16:33:41 +02:00
doc vim-patch:8.1.2221: cannot filter :disp output 2022-02-10 07:28:54 +08:00
ftplugin vim-patch:partial:f10911e5db16 (#17248) 2022-01-31 15:27:01 +01:00
indent vim-patch:c4573eb12dba (#17258) 2022-01-31 18:09:51 +01:00
keymap vim-patch:6c391a74fe90 (#15654) 2021-09-13 16:33:41 +02:00
lua fix(lsp): correct prefix when filterText is present (#17051) 2022-02-11 14:04:15 +01:00
macros vim-patch:4072ba571bab 2021-05-01 22:29:03 -04:00
pack/dist/opt vim-patch:partial:f10911e5db16 (#17248) 2022-01-31 15:27:01 +01:00
plugin vim-patch:519cc559b08b (#16340) 2021-11-17 10:02:59 +01:00
print
queries/c treesitter: Update to 0.19.3 2021-03-09 19:21:26 +01:00
spell vim-patch:8.2.0038: spell suggestions insufficiently tested 2021-06-12 13:06:49 -04:00
syntax vim-patch:partial:f10911e5db16 (#17248) 2022-01-31 15:27:01 +01:00
tools vim-patch:6304be625ce4 (#16450) 2021-11-27 19:39:42 +01:00
tutor docs(tutor): modify for Neovim rather than Vim (#17092) 2022-01-30 13:53:01 +01:00
bugreport.vim vim-patch:314dd79cac2a 2019-07-29 20:50:07 +02:00
CMakeLists.txt vim-patch:8.2.3676: unused runtime file (#16441) 2021-11-26 17:16:11 +01:00
delmenu.vim vim-patch:8.1.2416: loading menus sets v:errmsg 2021-04-11 17:05:42 -04:00
filetype.lua fix(filetype): match on <afile> rather than <abuf> (#16943) 2022-01-05 09:50:54 -07:00
filetype.vim vim-patch:8.2.4274: Basic and form filetype detection is incomplete (#17259) 2022-02-01 08:35:28 +01:00
ftoff.vim
ftplugin.vim feat(runtime): Allow lua to be used in ftplugin 2021-06-11 01:01:02 +06:00
ftplugof.vim
indent.vim feat(runtime): Allow lua to be used in indent 2021-06-11 01:01:02 +06:00
indoff.vim
macmap.vim
makemenu.vim vim-patch:95a9dd1efc5a 2021-04-27 09:21:32 -04:00
menu.vim vim-patch:65e0d77a66b7 2021-04-28 21:57:50 -04:00
mswin.vim vim-patch:d47d52232bf2 2019-07-29 20:50:07 +02:00
nvim.appdata.xml fix(runtime): add missing release metadata 2021-12-31 19:04:37 +01:00
nvim.desktop vim-patch:23515b4ef758 2021-05-01 22:29:03 -04:00
nvim.png Dist: make icon a proper square (#9716) 2019-03-11 21:00:12 +01:00
optwin.vim vim-patch:partial:0e6adf8a29d5 2021-12-25 11:31:54 +08:00
scripts.vim vim-patch:8.2.4095: sed script not recognized by the first line (#17101) 2022-01-15 14:47:25 +01:00
synmenu.vim vim-patch:4466ad6baa22 2021-05-01 22:29:02 -04:00