-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
24 lines (18 loc) · 763 Bytes
/
init.lua
File metadata and controls
24 lines (18 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
-- Function to run CMake and generate compile_commands.json
local function cmake_generate()
local cmd = "!cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
vim.api.nvim_command(cmd)
-- Automatically symlink it to root so clangd sees it immediately
os.execute("ln -sf build/compile_commands.json .")
print("CMake: Project generated and compile_commands.json linked.")
end
-- Map it to a key
vim.keymap.set("n", "<leader>cg", cmake_generate, { desc = "CMake Generate Project" })
vim.lsp.enable("gleam")
vim.opt.termguicolors = true
-- LaTeX configuration for VimTeX : MACOs
vim.g.vimtex_view_method = "skim"
vim.g.vimtex_view_skim_activate = 1
vim.g.vimtex_view_skim_sync = 1