dotfiles/nvim/.config/nvim/after/ftplugin/c.lua

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
502 B
Lua
Raw Normal View History

local lsp_utils = require('lsp-utils')
local clangd_config = lsp_utils.clangd_config()
vim.lsp.start(clangd_config)
vim.bo.makeprg = 'meson compile -C build'
vim.keymap.set('n', 'gh', ":ClangdSwitchSourceHeader<CR>", { noremap=true, buffer=0 })
vim.keymap.set('n', 'gq', ":!gst-indent %<CR>" , { noremap=true, buffer=0 })
vim.api.nvim_create_autocmd({ "BufReadPre", "BufWinEnter" }, {
pattern = { "*/usr/include/*" },
callback = function()
vim.bo.buflisted = false
end,
})