nikvdp / nvim-lsp-config

97 stars 22 forks source link

This is not exactly an issue , but it is #3

Closed DevVoyagerX closed 3 years ago

DevVoyagerX commented 3 years ago

Is there auto pairing plugin in the setup? I need it caus its time saving , when i put a " the other one automaticallly puts . If it is not there can you provide steps to install one using your setup? I am quite confused with this lua ..........

nikvdp commented 3 years ago

I use windwp/nvim-autopairs for this. For a minimal setup you can add Plug 'windwp/nvim-autopairs' to the plugins block in your init.vim and then add something like this (outside of the plugins block) to your init.vim:

lua <<EOF
    require "nvim-autopairs".setup({
        disable_filetype = {"TelescopePrompt", "vim"}
    })
EOF

Autopairing should then start working after doing :PlugInstall and/or restarting neovim

DevVoyagerX commented 3 years ago

Can you tell me how to setup autopairs with the nvim-compe as mentioned in the README.md file of hrsh7th/nvim-compe ? When i place the code mentined in the README.md file for autopairs I get an error when i try to write some code.I get this error when i press ENTER key.

Error executing lua .../share/nvimvimplug/nvim-autopairs/lua/nvim-autopairs.lua:120: attempt to index field 'config' (a nil value)

Can you update this repository with nvim-autopairs setup so that new users can use it out of the box? I need that when autocomplete menu pops up and press enter for a function it should end with the bracets automatically as i have seen in lunar vim.