{"action":"created","issue":{"url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/532","repository_url":"https://api.github.com/repos/prabirshrestha/vim-lsp","labels_url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/532/labels{/name}","comments_url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/532/comments","events_url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/532/events","html_url":"https://github.com/prabirshrestha/vim-lsp/issues/532","id":502132692,"node_id":"MDU6SXNzdWU1MDIxMzI2OTI=","number":532,"title":"Lsp seems to cancel insert Mode","user":{"login":"Vitax","id":7385477,"node_id":"MDQ6VXNlcjczODU0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/7385477?v=4","gravatar_id":"","url":"https://api.github.com/users/Vitax","html_url":"https://github.com/Vitax","followers_url":"https://api.github.com/users/Vitax/followers","following_url":"https://api.github.com/users/Vitax/following{/other_user}","gists_url":"https://api.github.com/users/Vitax/gists{/gist_id}","starred_url":"https://api.github.com/users/Vitax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vitax/subscriptions","organizations_url":"https://api.github.com/users/Vitax/orgs","repos_url":"https://api.github.com/users/Vitax/repos","events_url":"https://api.github.com/users/Vitax/events{/privacy}","received_events_url":"https://api.github.com/users/Vitax/received_events","type":"User","site_admin":false},"labels":[{"id":476149534,"node_id":"MDU6TGFiZWw0NzYxNDk1MzQ=","url":"https://api.github.com/repos/prabirshrestha/vim-lsp/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-10-03T15:20:08Z","updated_at":"2019-10-03T15:36:22Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI am having issues using the language server protocols with nmc2. As you can see in the gif something seems to cancel the insert mode and I cannot figure out what. I recreated my init.vim to the bare minimum where I could write code again but no changes there.\r\n\r\n![nvim-lsp](https://user-images.githubusercontent.com/7385477/66139851-67107b80-e601-11e9-9278-e9b7e0de02fb.gif)\r\n\r\nI am gonna include my init.vim as well so maybe you can pin point the error:\r\n```\r\n\"\r\n\" Plug-Ins\r\n\"\r\ncall plug#begin()\r\n\r\n\"\r\n\" Colorschemes\r\n\"\r\nPlug 'morhetz/gruvbox'\r\nPlug 'vim-airline/vim-airline'\r\n\r\n\"\r\n\" Utilities\r\n\"\r\n\" Tree Explorer\r\nPlug 'scrooloose/nerdtree'\r\n\r\n\" Fuzzy File Searcher\r\nPlug 'junegunn/fzf'\r\n\r\n\"\r\n\" Programming\r\n\"\r\n\" Autocompletion framework\r\nPlug 'ncm2/ncm2'\r\nPlug 'roxma/nvim-yarp'\r\n\r\n\" Language Protocol Servers\r\nPlug 'ryanolsonx/vim-lsp-typescript'\r\n\r\n\" Default path and buffer completion\r\nPlug 'ncm2/ncm2-bufword'\r\nPlug 'ncm2/ncm2-path'\r\n\r\n\" Snippet competion framework\r\nPlug 'ncm2/ncm2-ultisnips'\r\nPlug 'SirVer/ultisnips'\r\n\r\n\" Language Server Protocol for nvim\r\nPlug 'prabirshrestha/async.vim'\r\nPlug 'prabirshrestha/vim-lsp'\r\nPlug 'ncm2/ncm2-vim-lsp'\r\n\r\n\" Language Protocol PlugIns\r\nPlug 'ryanolsonx/vim-lsp-typescript'\r\nPlug 'ryanolsonx/vim-lsp-javascript'\r\n\r\ncall plug#end()\r\n\r\n\"\r\n\" Color-scheme Settings\r\n\" \r\nset t_Co=256\r\nset termguicolors\r\nset background=dark\r\ncolorscheme gruvbox\r\n\r\n\"\r\n\" Editor Settings\r\n\"\r\n\" Enable syntax highlighting\r\nsyntax on\r\n\r\n\" Enable file type recognition for nvim and plug-ins\r\nfiletype on\r\nfiletype plugin on\r\nfiletype indent on\r\n\r\n\" Set text encofing\r\nset encoding=utf-8\r\n\r\n\" Set guifont\r\nset guifont=\"Iosevka\\ Nerd\\ Font\\ Mono\"\r\n\r\nset tabstop=4\r\nset shiftwidth=4\r\nset textwidth=100\r\nset expandtab\r\nset hlsearch\r\nset number\r\nset ruler\r\nset wrap\r\nset linebreak\r\n\r\n\" setup usage of system clipboard\r\nset clipboard=unnamedplus\r\n\r\n\" enable mosue\r\nset mouse=a\r\n\r\n\" Ignore case sensitivity as long as there is not in the search string\r\nset ignorecase\r\nset smartcase\r\n\r\n\" Reduce shortcut delay to 500ms\r\nset timeoutlen=500\r\n\r\n\" Deactivate spell checking by default\r\nset nospell\r\n\r\n\" Buffer settings to make it easier working with them\r\nset hidden\r\nset confirm\r\nset autowriteall\r\nset wildmenu wildmode=full\r\n\r\nset completeopt=noinsert,menuone,noselect\r\nset shortmess+=c\r\n\r\n\r\n\" \r\n\" Enable and setup Plugins here\r\n\"\r\n\" Register Language Protocol Servers\r\n\" Javascript\r\nau User lsp_setup call lsp#register_server({\r\n    \\ 'name': 'javascript support using typescript-language-server',\r\n    \\ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},\r\n    \\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'package.json'))},\r\n    \\ 'whitelist': ['javascript', 'javascript.jsx', 'javascriptreact'],\r\n\\ })\r\n\r\n\" Typescript\r\n\"if executable('typescript-language-server')\r\n\"    au User lsp_setup call lsp#register_server({\r\n\"        \\ 'name': 'typescript-language-server',\r\n\"        \\ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},\r\n\"        \\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'tsconfig.json'))},\r\n\"        \\ 'whitelist': ['typescript', 'typescript.tsx'],\r\n\"    \\ })\r\n\"endif\r\n\r\n\" C++\r\n\"if executable('clangd')\r\n\"    au User lsp_setup call lsp#register_server({\r\n\"        \\ 'name': 'clangd',\r\n\"        \\ 'cmd': {server_info->['clangd', '-background-index']},\r\n\"        \\ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'],\r\n\"    \\ })\r\n\"endif\r\n\r\n\" Moving in snippet with <C-j> <C-k>\r\nlet g:UltiSnipsExpandTrigger\t\t= \"<Plug>(ultisnips_expand)\"\r\nlet g:UltiSnipsJumpForwardTrigger\t= \"<c-j>\"\r\nlet g:UltiSnipsJumpBackwardTrigger\t= \"<c-k>\"\r\nlet g:UltiSnipsRemoveSelectModeMappings = 0\r\n\r\n\" Enable ncm2\r\nautocmd BufEnter * call ncm2#enable_for_buffer()\r\n\r\n\"  Use fzf as fuzzy finder\r\nset rtp+=/opt/fzf\r\n\r\n\" Setup Nerdtree\r\nautocmd StdinReadPre * let s:std_in=1\r\nautocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists(\"s:std_in\") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif\r\n\r\n\"\r\n\" Setup Keybinding\r\n\"\r\n\" Map leader\r\nlet mapleader=\"\\<Space>\"\r\n\r\n\" save file\r\nnnoremap <leader>w :w<CR>\r\n\r\n\" delete buffer\r\nnnoremap <leader>q :bdel<CR>\r\n\r\n\" next buffer\r\nnnoremap <C-l> :bn<CR>\r\n\r\n\" previous buffer\r\nnnoremap <C-h> :bp<CR>\r\n\r\n\" Bind iterration through elements with <Tab> and <S-Tab>\r\ninoremap <expr> <Tab> pumvisible() ? \"\\<C-n>\" : \"\\<Tab>\"\r\ninoremap <expr> <S-Tab> pumvisible() ? \"\\<C-p>\" : \"\\<S-Tab>\"\r\n\r\n\" Press enter key to trigger snippet expansion\r\ninoremap <silent> <expr> <CR> ncm2_ultisnips#expand_or(\"\\<CR>\", 'n')\r\n\r\n\" Alt Backspace to remove previous word\r\ninoremap <A-BS> <C-w>\r\n\r\n\" Bind Nerdtree toggle\r\nnnoremap <A-n> :NERDTreeToggle<CR>\r\n\r\n\" Start searching in the project\r\nnnoremap <C-p> :FZF<CR>\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/comments/537999424","html_url":"https://github.com/prabirshrestha/vim-lsp/issues/532#issuecomment-537999424","issue_url":"https://api.github.com/repos/prabirshrestha/vim-lsp/issues/532","id":537999424,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNzk5OTQyNA==","user":{"login":"Vitax","id":7385477,"node_id":"MDQ6VXNlcjczODU0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/7385477?v=4","gravatar_id":"","url":"https://api.github.com/users/Vitax","html_url":"https://github.com/Vitax","followers_url":"https://api.github.com/users/Vitax/followers","following_url":"https://api.github.com/users/Vitax/following{/other_user}","gists_url":"https://api.github.com/users/Vitax/gists{/gist_id}","starred_url":"https://api.github.com/users/Vitax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vitax/subscriptions","organizations_url":"https://api.github.com/users/Vitax/orgs","repos_url":"https://api.github.com/users/Vitax/repos","events_url":"https://api.github.com/users/Vitax/events{/privacy}","received_events_url":"https://api.github.com/users/Vitax/received_events","type":"User","site_admin":false},"created_at":"2019-10-03T15:36:22Z","updated_at":"2019-10-03T15:36:22Z","author_association":"NONE","body":"Okay as you were probably expecting something up top seems to make ncm2 / lsp behave weirdly.\r\nWith the one below everything seems to work fine. \r\n```\r\ncall plug#begin()\r\nPlug 'ncm2/ncm2'\r\nPlug 'roxma/nvim-yarp'\r\n\r\nPlug 'ncm2/ncm2-bufword'\r\nPlug 'ncm2/ncm2-path'\r\n\r\nPlug 'ncm2/ncm2-ultisnips'\r\nPlug 'SirVer/ultisnips'\r\n\r\nPlug 'prabirshrestha/async.vim'\r\nPlug 'prabirshrestha/vim-lsp'\r\nPlug 'ncm2/ncm2-vim-lsp'\r\n\r\nPlug 'ryanolsonx/vim-lsp-typescript'\r\nPlug 'ryanolsonx/vim-lsp-javascript'\r\ncall plug#end()\r\n\r\nsyntax on\r\n\r\nfiletype on\r\nfiletype plugin on\r\nfiletype indent on\r\n\r\nset encoding=utf-8\r\nset completeopt=noinsert,menuone,noselect\r\nset shortmess+=c\r\n\r\nau User lsp_setup call lsp#register_server({\r\n    \\ 'name': 'javascript support using typescript-language-server',\r\n    \\ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},\r\n    \\ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'package.json'))},\r\n    \\ 'whitelist': ['javascript', 'javascript.jsx', 'javascriptreact'],\r\n\\ })\r\n\r\nlet g:UltiSnipsExpandTrigger\t\t= \"<Plug>(ultisnips_expand)\"\r\nlet g:UltiSnipsJumpForwardTrigger\t= \"<c-j>\"\r\nlet g:UltiSnipsJumpBackwardTrigger\t= \"<c-k>\"\r\nlet g:UltiSnipsRemoveSelectModeMappings = 0\r\n\r\nautocmd BufEnter * call ncm2#enable_for_buffer()\r\n```"}}
{"actor":{"display_login":"Vitax"}}