Skip to content

Commit

Permalink
Updated a bunch of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
luddet committed Mar 29, 2024
1 parent 9fd922c commit e6f7351
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 70 deletions.
12 changes: 12 additions & 0 deletions lua/custom/plugins/autopairs.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
'windwp/nvim-autopairs',
-- Optional dependency
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
require('nvim-autopairs').setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
local cmp = require 'cmp'
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
end,
}
6 changes: 6 additions & 0 deletions lua/custom/plugins/gruvbox-baby.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
return {
'luisiacc/gruvbox-baby',
config = function()
vim.cmd.colorscheme 'gruvbox-baby'
end,
}
158 changes: 93 additions & 65 deletions lua/kickstart/plugins/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,109 @@
-- kickstart.nvim and not kitchen-sink.nvim ;)

return {
-- NOTE: Yes, you can install new plugins here!
'mfussenegger/nvim-dap',
-- NOTE: And you can specify dependencies as well
dependencies = {
{
'nvim-neotest/nvim-nio',
},
{
'leoluz/nvim-dap-go',
config = function()
require('dap-go').setup()
end,
dependencies = { 'mfussenegger/nvim-dap' },
},
{
'mfussenegger/nvim-dap-python',
config = function()
require('dap-python').setup 'python'
end,
dependencies = { 'mfussenegger/nvim-dap' },
},
{
-- Creates a beautiful debugger UI
'rcarriga/nvim-dap-ui',
dependencies = {
'mfussenegger/nvim-dap',
'nvim-nio',
},
config = function()
local dap = require 'dap'
local dapui = require 'dapui'
-- Dap UI setup
-- For more information, see |:help nvim-dap-ui|
dapui.setup {
-- Set icons to characters that are more likely to work in every terminal.
-- Feel free to remove or use ones that you like more! :)
-- Don't feel like these are good choices.
icons = { expanded = '', collapsed = '', current_frame = '*' },
controls = {
enabled = true,
icons = {
pause = '',
play = '',
step_into = '',
step_over = '',
step_out = '',
step_back = 'b',
run_last = '▶▶',
terminate = '',
disconnect = '',
},
},
}

-- Installs the debug adapters for you
'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })

-- Add your own debuggers here
'leoluz/nvim-dap-go',
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
end,
},
config = function()
local dap = require 'dap'
local dapui = require 'dapui'

require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_setup = true,
{
-- NOTE: Yes, you can install new plugins here!
'mfussenegger/nvim-dap',
-- NOTE: And you can specify dependencies as well
dependencies = {

-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},
-- Installs the debug adapters for you
'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',

-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
},
}
-- Add your own debuggers here
},
config = function()
local dap = require 'dap'
-- local dapui = require 'dapui'

-- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
vim.keymap.set('n', '<leader>B', function()
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end, { desc = 'Debug: Set Breakpoint' })
require('dap').set_log_level 'TRACE'

-- Dap UI setup
-- For more information, see |:help nvim-dap-ui|
dapui.setup {
-- Set icons to characters that are more likely to work in every terminal.
-- Feel free to remove or use ones that you like more! :)
-- Don't feel like these are good choices.
icons = { expanded = '', collapsed = '', current_frame = '*' },
controls = {
icons = {
pause = '',
play = '',
step_into = '',
step_over = '',
step_out = '',
step_back = 'b',
run_last = '▶▶',
terminate = '',
disconnect = '',
},
},
}
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_setup = true,
automatic_installation = true,

-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},

dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
},
}

-- Install golang specific config
require('dap-go').setup()
end,
-- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
vim.keymap.set('n', '<F11>', dap.step_into, { desc = 'Debug: Step Into' })
vim.keymap.set('n', '<F10>', dap.step_over, { desc = 'Debug: Step Over' })
vim.keymap.set('n', '<S-F11>', dap.step_out, { desc = 'Debug: Step Out' })
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
vim.keymap.set('n', '<leader>B', function()
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end, { desc = 'Debug: Set Breakpoint' })
end,
},
}
6 changes: 3 additions & 3 deletions lua/kickstart/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ return {
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
clangd = {},
gopls = {},
pyright = {},
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
Expand Down
1 change: 1 addition & 0 deletions lua/kickstart/plugins/tokyonight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ return {
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
'folke/tokyonight.nvim',
enabled = false,
priority = 1000, -- make sure to load this before all the other start plugins
init = function()
-- Load the colorscheme here.
Expand Down
4 changes: 2 additions & 2 deletions lua/lazy-plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ require('lazy').setup({
-- Here are some example plugins that I've included in the kickstart repository.
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.debug',
require 'kickstart.plugins.indent_line',

-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
Expand Down
4 changes: 4 additions & 0 deletions lua/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
-- NOTE: You can change these options as you wish!
-- For more options, you can see `:help option-list`

vim.g.python3_host_prog = vim.fn.stdpath 'data' .. '/py3.12-venv/Scripts/python'

-- Make line numbers default
vim.opt.number = true
-- You can also add relative line numbers, for help with jumping.
Expand Down Expand Up @@ -59,4 +61,6 @@ vim.opt.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 5

vim.opt.tabstop = 4

-- vim: ts=2 sts=2 sw=2 et

0 comments on commit e6f7351

Please sign in to comment.