add cpp custom snippet and tone down diagnostics

This commit is contained in:
mintycube 2024-04-29 15:07:37 +05:00
parent 44c76af6c6
commit cfce3cf614
4 changed files with 216 additions and 178 deletions

View File

@ -124,6 +124,14 @@ return {
info = "", info = "",
}) })
vim.diagnostic.config({
underline = false,
virtual_text = false,
signs = true,
update_in_insert = false,
severity_sort = true,
})
require("mason-lspconfig").setup({ require("mason-lspconfig").setup({
ensure_installed = { ensure_installed = {
"clangd", "clangd",

View File

@ -29,6 +29,18 @@ return {
hl.DiagnosticVirtualTextWarn = { hl.DiagnosticVirtualTextWarn = {
fg = colors.comment fg = colors.comment
} }
hl.DiagnosticSignError = {
fg = colors.comment
}
hl.DiagnosticSignHint = {
fg = colors.comment
}
hl.DiagnosticSignInfo = {
fg = colors.comment
}
hl.DiagnosticSignWarn = {
fg = colors.comment
}
end, end,
}) })
vim.cmd.colorscheme("tokyonight") vim.cmd.colorscheme("tokyonight")
@ -349,14 +361,14 @@ return {
end, end,
}, },
winopts = { winopts = {
height = 0.3, height = 0.4,
width = 0.5, width = 0.5,
}, },
}) })
end), end),
dashboard.button("f", " Find file", ":lua require('fzf-lua').files()<CR>"), -- dashboard.button("f", " Find file", ":lua require('fzf-lua').files()<CR>"),
dashboard.button("t", "󱎸 Find text", ":lua require('fzf-lua').live_grep_native()<CR>"), -- dashboard.button("t", "󱎸 Find text", ":lua require('fzf-lua').live_grep_native()<CR>"),
dashboard.button("s", " Restore Session", ":lua require('persistence').load()<CR>"), dashboard.button("s", " Restore Session", ":lua require('persistence').load()<CR>"),
dashboard.button("n", "󰠮 Notes", ":lua require('fzf-lua').files({cwd =[[~/notes]]})<CR>"), dashboard.button("n", "󰠮 Notes", ":lua require('fzf-lua').files({cwd =[[~/notes]]})<CR>"),
dashboard.button("c", " Configuration", ":e $MYVIMRC <CR>"), dashboard.button("c", " Configuration", ":e $MYVIMRC <CR>"),

View File

@ -0,0 +1,14 @@
{
"Hello World": {
"prefix": "hello",
"body": [
"#include <iostream>",
"",
"int main () {",
"\t$1",
"\treturn 0;",
"}"
],
"description": "starter template"
}
}

View File

@ -15,6 +15,10 @@
"all" "all"
], ],
"path": "./global.json" "path": "./global.json"
},
{
"language": "cpp",
"path": "./cpp.json"
} }
] ]
} }