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

@ -5,7 +5,7 @@
local M = {}
M.ui = {
theme = "onedark",
theme = "github_dark",
-- hl_override = {
-- Comment = { italic = true },

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"
}
}
}
})

View file

@ -1,38 +1,61 @@
return {
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
event = 'BufWritePre', -- uncomment for format on save
config = function()
require "configs.conform"
end,
},
-- These are some examples, uncomment them if you want to see them work!
-- {
-- "neovim/nvim-lspconfig",
-- config = function()
-- require("nvchad.configs.lspconfig").defaults()
-- require "configs.lspconfig"
-- end,
-- },
--
-- {
-- "williamboman/mason.nvim",
-- opts = {
-- ensure_installed = {
-- "lua-language-server", "stylua",
-- "html-lsp", "css-lsp" , "prettier"
-- },
-- },
-- },
--
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "vim", "lua", "vimdoc",
-- "html", "css"
-- },
-- },
-- },
{
"github/copilot.vim",
lazy = false,
config = function ()
vim.g.copilot_no_tab_map = true
vim.g.copilot_assume_mapped = true
vim.api.nvim_set_keymap("i", "<C-J>", 'copilot#Accept("<CR>")', {silent = true, expr = true})
end,
},
{
"neovim/nvim-lspconfig",
config = function()
require "configs.neodev"
require("nvchad.configs.lspconfig").defaults()
require "configs.lspconfig"
end,
},
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"lua-language-server", "stylua",
"html-lsp", "css-lsp" , "prettier",
"cmake-language-server", "clangd"
},
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"vim", "lua", "vimdoc",
"html", "css", "cmake", "c", "cpp", "zig", "rust"
},
},
},
{
"mfussenegger/nvim-dap",
config = function()
require "configs.dap-config"
end,
},
{
"rcarriga/nvim-dap-ui",
dependencies = {
"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"
}
},
{
"folke/neodev.nvim",
opts = {}
}
}