This commit is contained in:
Tim Blume 2024-04-04 00:07:52 +02:00
parent d801a059ef
commit ca71ec5167
6 changed files with 132 additions and 32 deletions

View file

@ -0,0 +1,26 @@
require("dap").adapters.lldb = {
type = "executable",
command = "/usr/bin/lldb-vscode", -- adjust as needed
name = "lldb",
}
local lldb = {
name = "Launch lldb",
type = "lldb", -- matches the adapter
request = "launch", -- could also attach to a currently running process
program = function()
return vim.fn.input(
"Path to executable: ",
vim.fn.getcwd() .. "/",
"file"
)
end,
cwd = "${workspaceFolder}",
stopOnEntry = false,
args = {},
runInTerminal = false,
}
require('dap').configurations.rust = {
lldb -- different debuggers or more configurations can be used here
}

View file

@ -4,7 +4,7 @@ local on_init = require("nvchad.configs.lspconfig").on_init
local capabilities = require("nvchad.configs.lspconfig").capabilities
local lspconfig = require "lspconfig"
local servers = { "html", "cssls" }
local servers = { "html", "cssls", "cmake", "clangd" }
-- lsps with default config
for _, lsp in ipairs(servers) do

18
lua/configs/neodev.lua Normal file
View file

@ -0,0 +1,18 @@
-- IMPORTANT: make sure to setup neodev BEFORE lspconfig
require("neodev").setup({
library = { plugins = { "nvim-dap-ui" }, types = true }
})
-- then setup your lsp server as usual
local lspconfig = require('lspconfig')
-- example to setup lua_ls and enable call snippets
lspconfig.lua_ls.setup({
settings = {
Lua = {
completion = {
callSnippet = "Replace"
}
}
}
})