LSP + Company not inserting parentheses when triggering completion reddit / emacs ---------------------------------------------------------------------- beepie23 · 2022-05-07 20:58 When I trigger a completion with company in lsp it doesn't insert parentheses. I have yasnippet enabled and lsp-enable-snippet is t. I also have electric pairs enabled but I don't think it's relevant here. Example: I select the completion `print` in python and it completes solely to `print` I want it to complete to `print()` ---------------------------------------------------------------------- yyoncho · 2022-05-07 21:08 What is the server? Note that some of then just does not have snippet support. ---------------------------------------------------------------------- beepie23 · 2022-05-07 21:23 pyright So if it doesn't have snippet support there is no way to get this functionality? ---------------------------------------------------------------------- yyoncho · 2022-05-07 21:29 Let me test it tomorrow - pyright should work. ---------------------------------------------------------------------- Qwarctick · 2022-05-07 21:57 Got the same behavior with pyright. Edit: Seems to be a problem with pyright : https://github.com/emacs- lsp/lsp-pyright/issues/32 Edit2: There is no snippet support in pyright: https://github.com/microsoft/pyright/issues/924 ---------------------------------------------------------------------- tech_addictede · 2022-05-08 14:19 I would suggest going with pylsp. ---------------------------------------------------------------------- beepie23 · 2022-05-08 17:56 I actually tried setting up pyright on neovim and I was able to get the parenthesis completion I wanted there. I feel like this means it has to be possible on Emacs. I don't really want to switch from pyright either. ---------------------------------------------------------------------- [deleted] · 2022-05-10 04:51 Did you use coc.nvim? Coc.nvim injects parentheses into pyright completions, pyright on it's own doesn't provides parentheses ---------------------------------------------------------------------- [deleted] · 2022-05-10 16:15 [deleted] ---------------------------------------------------------------------- beepie23 · 2022-05-10 17:50 I used neovim-cmp with nvim-autopairs. It might not be pyright that gave me the parentheses but it should still be possible in emacs, right?