!cylwlNXSwagQmZSkzs:matrix.org

Neovim

3327 Members
neovim is a great text editor | https://neovim.io | https://github.com/sponsors/neovim | see #neovim_space:matrix.org for more rooms229 Servers

Load older messages


SenderMessageTime
4 Mar 2024
@tristan957:matrix.orgtristan957I think it requires negotiation between your client and server via the client specifying what capabilities it supports19:17:04
@avongard:matrix.orgavongard

from my nvim-cmp settings:

            sources = cmp.config.sources({
              { name = "nvim_lsp" },
              { name = "luasnip" },
            }, {
              { name = "buffer" },
              { name = "path" },
              { name = "treesitter" },
            }),
19:17:10
@tristan957:matrix.orgtristan957aren't you using omnifunc for completion?19:20:29
@avongard:matrix.orgavongard
In reply to @tristan957:matrix.org
aren't you using omnifunc for completion?

I'm not sure I really understand what omnifunc is. Its one of the options that shows up when I hit ctrl+x (followed by ctrl+o), and also I copied ```` vim.api.nvim_buf_set_option(ev.buf, 'omnifunc', 'v:lua.vim.lsp.omnifunc')

19:23:26
@avongard:matrix.orgavongard
In reply to @tristan957:matrix.org
aren't you using omnifunc for completion?
* I'm not sure I really understand what omnifunc is. Its one of the options that shows up when I hit ctrl+x (followed by ctrl+o), and also I copied vim.api.nvim_buf_set_option(ev.buf, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
19:23:37
@tristan957:matrix.orgtristan957Omnifunc is generally <C-x>...19:23:55
@avongard:matrix.orgavongardinto my lsp attach autocmd19:23:59
@tristan957:matrix.orgtristan957But I think you need nvim-cmp19:24:01
@tristan957:matrix.orgtristan957which is not omnifunc19:24:11
@avongard:matrix.orgavongardThe completion options that pop up just as I type... that should be coming from nvim-cmp, right?19:25:27
@tristan957:matrix.orgtristan957Depends on your config, but most likely19:28:54
@avongard:matrix.orgavongardI think the lsp completion may be working, is there a way to see what sources each item in the menu is from? I guess it ISN'T showing me things from any of my installed libraries, just things like builtins, which I figure is coming from the lsp. But if things from libraries I'm not currently importing aren't showing up, how would I complete to one of those to get it to show up?19:34:27
@tristan957:matrix.orgtristan957 avongard: https://github.com/tristan957/dotfiles/commit/ded40eb42bf976f06d3441ce9633e2814631e5ee#diff-caf995280d8faad32c841abe44aeb8b4a639f4416ae4b4b87f5425451509978aL71-L81 19:35:47
@tristan957:matrix.orgtristan957you may also try reading https://github.com/hrsh7th/nvim-cmp/blob/04e0ca376d6abdbfc8b52180f8ea236cbfddf782/doc/cmp.txt#L957 if you really like omnifunc19:38:52
@kuna.prime:matrix.orgkuna.prime joined the room.19:47:41
@kuna.prime:matrix.orgkuna.prime hi: i have this set in my configuration vim.opt.langmap = '¸,š[,Š{,đ],Đ}'
`
19:48:48
@kuna.prime:matrix.orgkuna.prime * hi: i have this set in my configuration vim.opt.langmap = '¸`,š[,Š{,đ],Đ}' but recentyl it just stopped working 19:49:11
@kuna.prime:matrix.orgkuna.primedid anything changed? i'm running nightly builds 19:49:34
@avongard:matrix.orgavongard
In reply to @tristan957:matrix.org
avongard: https://github.com/tristan957/dotfiles/commit/ded40eb42bf976f06d3441ce9633e2814631e5ee#diff-caf995280d8faad32c841abe44aeb8b4a639f4416ae4b4b87f5425451509978aL71-L81
I've done that and added the format options to my nvim-cmp config, but still don't get the [LSP] just the function, module stuff, which I think is from the lsp. So I think its getting stuff from the lsp, just not stuff from my libraries that I'm not currently importing, which makes sense if I wasn't trying to use autoimport (why would you show me things I haven't imported and would need to import before using?), but with autoimport there, I'd like to be able to complete to those options.
19:49:59
@tristan957:matrix.orgtristan957Are you also doing https://github.com/tristan957/dotfiles/blob/master/nvim/.config/nvim/lua/tristan957/plugins/lspconfig/init.lua#L23?19:51:10
@tristan957:matrix.orgtristan957and then setting that where you setup your server19:51:21
@avongard:matrix.orgavongard
In reply to @tristan957:matrix.org
you may also try reading https://github.com/hrsh7th/nvim-cmp/blob/04e0ca376d6abdbfc8b52180f8ea236cbfddf782/doc/cmp.txt#L957 if you really like omnifunc
I prefer it to come up as I'm typing. If nvim-cmp would be serving as the omni function there, isn't that just saying I'd now need to manually start the completion and that is all that changes there? I still don't get what an omnifunc is and none of the neovim help files that mention omnifunc seem to clear up what it is.
19:51:40
@avongard:matrix.orgavongard I wasn't doing anything with capabilities, but I've added that to my .setup for pylsp. I'm not noticing anything different. Why are you getting your list of capabilities from cmp_nvim_lsp? shouldn't that just relate to completion capabilities? 19:57:18
@tristan957:matrix.orgtristan957you nned it if you want to support all lsp capabilities20:18:52
@tristan957:matrix.orgtristan957import on auto complete works for me in rust analyzer, so you might try that20:19:17
@tristan957:matrix.orgtristan957then you can narrow it down to pylsp20:19:25
@avongard:matrix.orgavongard
In reply to @tristan957:matrix.org
import on auto complete works for me in rust analyzer, so you might try that
Roger, I can give that a try, but probably not for a while, thank you for all your assistance so far, I appreciate you helping me troubleshoot this with me
20:27:45
@tristan957:matrix.orgtristan957No problem20:34:09
@slowandfurious:matrix.orgSlowAndFurious left the room.23:20:01
@orangerot:matrix.org🍊🔴 joined the room.23:58:09

There are no newer messages yet.


Back to Room ListRoom Version: 10