add c/c++ support
This commit is contained in:
parent
f35286bd2b
commit
b299ed09e2
@ -13,6 +13,8 @@ Just clone this repo into `~/.config/nvim` and launch neovim.
|
||||
- Dart
|
||||
- Go
|
||||
- Rust
|
||||
- C/C++
|
||||
- Lua
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
@ -21,16 +21,6 @@ vim.wo.relativenumber = true
|
||||
-- If you want to see more details:
|
||||
--require("oil").set_columns({ "icon", "permission", "size" })
|
||||
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
rust = { "rustfmt", lsp_format = "fallback" },
|
||||
javascript = { "prettier", stop_after_first = true },
|
||||
dart = { "dart format", lsp_format = "fallback" },
|
||||
go = { "gofmt" },
|
||||
},
|
||||
})
|
||||
|
||||
-- flutter telescope integration
|
||||
require("telescope").load_extension("flutter")
|
||||
|
||||
|
@ -138,5 +138,25 @@ return {
|
||||
require("lspconfig")["rust_analyzer"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig")["sourcekit"].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig")["clangd"].setup({
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--background-index",
|
||||
"-j=8",
|
||||
"--query-driver=/usr/bin/**/clang-*,/bin/clang,/bin/clang++,/usr/bin/gcc,/usr/bin/g++",
|
||||
"--clang-tidy",
|
||||
"--clang-tidy-checks=*",
|
||||
"--all-scopes-completion",
|
||||
"--cross-file-rename",
|
||||
"--completion-style=detailed",
|
||||
"--header-insertion-decorators",
|
||||
"--header-insertion=iwyu",
|
||||
"--pch-storage=memory",
|
||||
},
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
@ -2,6 +2,20 @@ return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {},
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
rust = { "rustfmt", lsp_format = "fallback" },
|
||||
javascript = { "prettier", stop_after_first = true },
|
||||
dart = { "dart format", lsp_format = "fallback" },
|
||||
go = { "gofmt" },
|
||||
swift = { "swiftformat" },
|
||||
c = { "clang-format" },
|
||||
cpp = { "clang-format" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"m4xshen/autoclose.nvim",
|
||||
|
Loading…
x
Reference in New Issue
Block a user