feat: add C related configs...can I be a real dev now?
This commit is contained in:
@@ -287,6 +287,41 @@ return {
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.c = {
|
||||
{
|
||||
type = "lldb",
|
||||
name = "Launch",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
},
|
||||
{
|
||||
type = "lldb",
|
||||
name = "Launch with arguments",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
args = function()
|
||||
local args_str = vim.fn.input("Arguments: ")
|
||||
return require("dap.utils").splitstr(args_str)
|
||||
end,
|
||||
},
|
||||
{
|
||||
type = "lldb",
|
||||
name = "Attach to process",
|
||||
request = "attach",
|
||||
pid = require("dap.utils").pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
|
||||
local codelldb_path = vim.fn.has("win32")
|
||||
and vim.fn.stdpath("data") .. "/mason/packages/codelldb/extension/adapter/codelldb.exe"
|
||||
or vim.fn.stdpath("data") .. "/mason/packages/codelldb/extension/adapter/codelldb"
|
||||
|
||||
+8
-2
@@ -282,9 +282,15 @@ return {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.lsp.enable("rust_analyzer")
|
||||
vim.lsp.enable("rust_analyzer")
|
||||
|
||||
vim.lsp.config("gh_actions_ls", {
|
||||
vim.lsp.config("clangd", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.lsp.enable("clangd")
|
||||
|
||||
vim.lsp.config("gh_actions_ls", {
|
||||
capabilities = capabilities,
|
||||
filetypes = { "yaml" },
|
||||
settings = {
|
||||
|
||||
@@ -4,11 +4,12 @@ return {
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.isort,
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.clang_format,
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ return {
|
||||
"ssh_config",
|
||||
"xml",
|
||||
"go",
|
||||
"c",
|
||||
},
|
||||
indent = { enabled = true },
|
||||
highlight = {
|
||||
|
||||
Reference in New Issue
Block a user