Update nvim config

This commit is contained in:
ak56 2024-05-09 20:51:41 -04:00
parent 2c989c5def
commit 84f5fadb05
4 changed files with 44 additions and 6 deletions

View File

@ -82,7 +82,7 @@ In the file: `lua/custom/plugins/filetree.lua`, add:
```lua ```lua
-- Unless you are still migrating, remove the deprecated commands from v1.x -- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) -- vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
return { return {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",

View File

@ -174,7 +174,7 @@ require('lazy').setup({
-- These are some example plugins that I've included in the kickstart repository. -- These are some example plugins that I've included in the kickstart repository.
-- Uncomment any of the lines below to enable them. -- Uncomment any of the lines below to enable them.
-- require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.autoformat',
-- require 'kickstart.plugins.debug', require 'kickstart.plugins.debug',
-- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping
@ -207,9 +207,18 @@ vim.o.clipboard = 'unnamedplus'
-- Enable break indent -- Enable break indent
vim.o.breakindent = true vim.o.breakindent = true
-- Whitespace
vim.o.expandtab = true
vim.o.shiftwidth = 4
vim.o.softtabstop = 4
vim.o.tabstop = 4
-- Save undo history -- Save undo history
vim.o.undofile = true vim.o.undofile = true
-- Shows current line highlight
vim.o.cursorline = true
-- Case insensitive searching UNLESS /C or capital in search -- Case insensitive searching UNLESS /C or capital in search
vim.o.ignorecase = true vim.o.ignorecase = true
vim.o.smartcase = true vim.o.smartcase = true
@ -227,6 +236,7 @@ vim.o.completeopt = 'menuone,noselect'
-- NOTE: You should make sure your terminal supports this -- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true vim.o.termguicolors = true
vim.o.guifont = "JetBrainsMono NFM"
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
@ -406,10 +416,10 @@ end
-- Add any additional override configuration in the following tables. They will be passed to -- Add any additional override configuration in the following tables. They will be passed to
-- the `settings` field of the server config. You must look up that documentation yourself. -- the `settings` field of the server config. You must look up that documentation yourself.
local servers = { local servers = {
-- clangd = {}, clangd = {},
-- gopls = {}, -- gopls = {},
-- pyright = {}, -- pyright = {},
-- rust_analyzer = {}, rust_analyzer = {},
-- tsserver = {}, -- tsserver = {},
lua_ls = { lua_ls = {

View File

@ -1,6 +1,5 @@
-- Unless you are still migrating, remove the deprecated commands from v1.x -- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
return { return {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
version = "*", version = "*",
@ -10,6 +9,9 @@ return {
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
}, },
config = function () config = function ()
require('neo-tree').setup {} require('neo-tree').setup {
vim.keymap.set('n', '<leader>sn', require('neo-tree').show, { desc = '[S]how [N]eotree' }),
vim.keymap.set('n', '<leader>fn', require('neo-tree').float, { desc = '[F]loat [N]eotree' })
}
end, end,
} }

View File

@ -39,6 +39,8 @@ return {
ensure_installed = { ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want -- Update this to ensure that you have the debuggers for the langs you want
'delve', 'delve',
'c',
'cpp'
}, },
} }
@ -52,6 +54,30 @@ return {
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end) end)
-- LLVM (Low Level Virtual Machine)
dap.adapters.lldb = {
type = 'executable',
command = 'lldb-vscode', -- adjust as needed, must be absolute path
--args: string[], -- arguments for the command
name = 'lldb'
}
dap.configurations.cpp = {
{
name = "Launch",
type = "lldb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ' .. vim.fn.getcwd() .. '/' .. 'file')
end,
stopOnEntry = false,
args = {},
runInTerminal = true,
},
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
-- Dap UI setup -- Dap UI setup
-- For more information, see |:help nvim-dap-ui| -- For more information, see |:help nvim-dap-ui|
dapui.setup { dapui.setup {