modify nvim config

This commit is contained in:
jonathan santis 2024-12-16 14:29:47 +01:00
parent 14527b42d7
commit 2cb5ad0acc

View File

@ -1,4 +1,5 @@
#require 'lspconfig'.clangd.setup{} #require 'lspconfig'.clangd.setup{}
vim.g.zig_fmt_autosave = 0 vim.g.zig_fmt_autosave = 0
vim.cmd("set number") vim.cmd("set number")
vim.cmd("set tabstop=4") vim.cmd("set tabstop=4")
@ -7,6 +8,7 @@ vim.cmd("set expandtab")
vim.cmd("set shiftwidth=4") vim.cmd("set shiftwidth=4")
vim.cmd("set ttyfast") vim.cmd("set ttyfast")
vim.cmd("let mapleader=','") vim.cmd("let mapleader=','")
vim.cmd("set makeprg=zig\\ run\\ %<.zig")
local vim = vim local vim = vim
local Plug = vim.fn['plug#'] local Plug = vim.fn['plug#']
@ -47,7 +49,7 @@ vim.g.zig_fmt_autosave = 0
vim.api.nvim_create_autocmd('BufWritePre',{ vim.api.nvim_create_autocmd('BufWritePre',{
pattern = {"*.zig", "*.zon"}, pattern = {"*.zig", "*.zon"},
callback = function(ev) callback = function(ev)
vim.lsp.buf.format() -- vim.lsp.buf.format()
end end
}) })