mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-06-01 08:07:48 +02:00
update nvim config
This commit is contained in:
parent
f3f5b24d61
commit
16e21c8274
|
@ -1,4 +1,3 @@
|
|||
local map = vim.api.nvim_set_keymap
|
||||
local lspc = require "lspconfig"
|
||||
local caps = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
local cmp = require "cmp"
|
||||
local luasnip = require "luasnip"
|
||||
|
||||
-- checks if the char before the cursor is a whitespace
|
||||
local function has_words_before()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match "%s" == nil
|
||||
|
@ -9,7 +10,7 @@ end
|
|||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue