[vim] Redo the keys lua module

Return a table from the module so that other modules that require it can access its functions in a namespaced way.
This commit is contained in:
Eryn Wells 2024-03-08 08:33:56 -08:00
parent 5e5c8f83c8
commit 95081a31a3
3 changed files with 53 additions and 26 deletions

View file

@ -1,8 +1,12 @@
-- Eryn Wells <eryn@erynwells.me>
local clangd_extensions = require 'clangd_extensions'
local cmp = require 'cmp'
local keys = require 'keys'
local lspconfig = require 'lspconfig'
local keys = require 'keys'
cmp.setup {
snippet = {
expand = function(args)
@ -51,7 +55,7 @@ local cmp_capabilities = require("cmp_nvim_lsp").default_capabilities()
local on_attach = function(client, buffer_number)
vim.api.nvim_buf_set_option(buffer_number, "omnifunc", "v:lua.vim.lsp.omnifunc")
keys.set_up_local_lsp_mappings(buffer_number)
keys.init_lsp_key_mappings(buffer_number)
end
lspconfig.clangd.setup {