mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
add cpp custom snippet and tone down diagnostics
This commit is contained in:
parent
44c76af6c6
commit
cfce3cf614
@ -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",
|
||||||
|
@ -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>"),
|
||||||
|
14
.config/nvim/lua/snippets/cpp.json
Normal file
14
.config/nvim/lua/snippets/cpp.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"Hello World": {
|
||||||
|
"prefix": "hello",
|
||||||
|
"body": [
|
||||||
|
"#include <iostream>",
|
||||||
|
"",
|
||||||
|
"int main () {",
|
||||||
|
"\t$1",
|
||||||
|
"\treturn 0;",
|
||||||
|
"}"
|
||||||
|
],
|
||||||
|
"description": "starter template"
|
||||||
|
}
|
||||||
|
}
|
@ -15,6 +15,10 @@
|
|||||||
"all"
|
"all"
|
||||||
],
|
],
|
||||||
"path": "./global.json"
|
"path": "./global.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"language": "cpp",
|
||||||
|
"path": "./cpp.json"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user