update nvim config

This commit is contained in:
LordMZTE 2022-10-22 01:22:58 +02:00
parent f3f5b24d61
commit 16e21c8274
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
2 changed files with 2 additions and 2 deletions

View file

@ -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())

View file

@ -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,
},