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

33
lazy-lock.json Normal file
View file

@ -0,0 +1,33 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "825a61bad1d60d917a7962d73cf3c683f4e0407e" },
"NvChad": { "branch": "v2.5", "commit": "6833c60694a626615911e379d201dd723511546d" },
"base46": { "branch": "v2.5", "commit": "adb64a6ae70f8c61c5ab8892f07d29dafd4d47ad" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" },
"copilot.vim": { "branch": "release", "commit": "9484e35cf222e9360e05450622a884f95c662c4c" },
"friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" },
"gitsigns.nvim": { "branch": "main", "commit": "4a1bc2ef16d495150897b1d3a11eb3d3eecfef0a" },
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
"lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
"nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" },
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" },
"nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" },
"nvim-lspconfig": { "branch": "master", "commit": "96e5711040df23583591391ce49e556b8cd248d8" },
"nvim-nio": { "branch": "master", "commit": "173f285eebb410199273fa178aa517fd2d7edd80" },
"nvim-tree.lua": { "branch": "master", "commit": "d8d3a1590a05b2d8b5eb26e2ed1c6052b1b47a77" },
"nvim-treesitter": { "branch": "master", "commit": "cc0e29727a9651e27869b7444e835c44fb1e7b4c" },
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
"telescope.nvim": { "branch": "master", "commit": "4626aaa2bcfdacf55fd6d44b430e2df81b2403ff" },
"ui": { "branch": "v2.5", "commit": "e1af69426b3c4b55c88bd1c81790c1c73b30bfa8" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
}

View file

@ -5,7 +5,7 @@
local M = {} local M = {}
M.ui = { M.ui = {
theme = "onedark", theme = "github_dark",
-- hl_override = { -- hl_override = {
-- Comment = { italic = true }, -- 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 capabilities = require("nvchad.configs.lspconfig").capabilities
local lspconfig = require "lspconfig" local lspconfig = require "lspconfig"
local servers = { "html", "cssls" } local servers = { "html", "cssls", "cmake", "clangd" }
-- lsps with default config -- lsps with default config
for _, lsp in ipairs(servers) do 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 { return {
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save event = 'BufWritePre', -- uncomment for format on save
config = function() config = function()
require "configs.conform" require "configs.conform"
end, end,
}, },
{
-- These are some examples, uncomment them if you want to see them work! "github/copilot.vim",
-- { lazy = false,
-- "neovim/nvim-lspconfig", config = function ()
-- config = function() vim.g.copilot_no_tab_map = true
-- require("nvchad.configs.lspconfig").defaults() vim.g.copilot_assume_mapped = true
-- require "configs.lspconfig" vim.api.nvim_set_keymap("i", "<C-J>", 'copilot#Accept("<CR>")', {silent = true, expr = true})
-- end, end,
-- }, },
-- {
-- { "neovim/nvim-lspconfig",
-- "williamboman/mason.nvim", config = function()
-- opts = { require "configs.neodev"
-- ensure_installed = { require("nvchad.configs.lspconfig").defaults()
-- "lua-language-server", "stylua", require "configs.lspconfig"
-- "html-lsp", "css-lsp" , "prettier" end,
-- }, },
-- }, {
-- }, "williamboman/mason.nvim",
-- opts = {
-- { ensure_installed = {
-- "nvim-treesitter/nvim-treesitter", "lua-language-server", "stylua",
-- opts = { "html-lsp", "css-lsp" , "prettier",
-- ensure_installed = { "cmake-language-server", "clangd"
-- "vim", "lua", "vimdoc", },
-- "html", "css" },
-- }, },
-- }, {
-- }, "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 = {}
}
} }