Skip to content

Commit

Permalink
blah
Browse files Browse the repository at this point in the history
  • Loading branch information
brizzbuzz committed Mar 15, 2024
1 parent 6f971d7 commit ebe0167
Show file tree
Hide file tree
Showing 11 changed files with 177 additions and 165 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: PR Checks
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v17
- name: Lint Nix Files
run: nix develop --command alejandra -c .
2 changes: 2 additions & 0 deletions dots/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ require("lazy").setup({
lspconfig.nil_ls.setup({})
lspconfig.rust_analyzer.setup({})
lspconfig.tailwindcss.setup({})
lspconfig.yamlls.setup({})
end,
},

Expand Down Expand Up @@ -664,6 +665,7 @@ require("lazy").setup({
"rust",
"vim",
"vimdoc",
"yaml",
},
-- Autoinstall languages that are not installed
auto_install = true,
Expand Down
20 changes: 10 additions & 10 deletions dots/nvim/lua/custom/plugins/dashboard.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
return {
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup {
-- config
}
end,
dependencies = { {'nvim-tree/nvim-web-devicons'}}
},
{
"nvimdev/dashboard-nvim",
event = "VimEnter",
config = function()
require("dashboard").setup({
-- config
})
end,
dependencies = { { "nvim-tree/nvim-web-devicons" } },
},
}
8 changes: 4 additions & 4 deletions dots/nvim/lua/custom/plugins/git.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
-- Do Git Things
'tpope/vim-fugitive',
-- Do GitHub Things
'tpope/vim-rhubarb',
-- Do Git Things
"tpope/vim-fugitive",
-- Do GitHub Things
"tpope/vim-rhubarb",
}
10 changes: 5 additions & 5 deletions dots/nvim/lua/custom/plugins/harpoon.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
return {
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" }
}
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
},
}
18 changes: 9 additions & 9 deletions dots/nvim/lua/custom/plugins/lsp.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
return {
{
'neovim/nvim-lspconfig',
dependencies = {
-- Useful status updates for LSP
'j-hui/fidget.nvim',
-- TODO: Need to make this enabled inside bigbang dir
'folke/neodev.nvim',
},
}
{
"neovim/nvim-lspconfig",
dependencies = {
-- Useful status updates for LSP
"j-hui/fidget.nvim",
-- TODO: Need to make this enabled inside bigbang dir
"folke/neodev.nvim",
},
},
}
120 changes: 60 additions & 60 deletions dots/nvim/lua/kickstart/plugins/autoformat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,71 +4,71 @@
-- Adds additional commands as well to manage the behavior

return {
'neovim/nvim-lspconfig',
config = function()
-- Switch for controlling whether you want autoformatting.
-- Use :KickstartFormatToggle to toggle autoformatting on or off
local format_is_enabled = true
vim.api.nvim_create_user_command('KickstartFormatToggle', function()
format_is_enabled = not format_is_enabled
print('Setting autoformatting to: ' .. tostring(format_is_enabled))
end, {})
"neovim/nvim-lspconfig",
config = function()
-- Switch for controlling whether you want autoformatting.
-- Use :KickstartFormatToggle to toggle autoformatting on or off
local format_is_enabled = true
vim.api.nvim_create_user_command("KickstartFormatToggle", function()
format_is_enabled = not format_is_enabled
print("Setting autoformatting to: " .. tostring(format_is_enabled))
end, {})

-- Create an augroup that is used for managing our formatting autocmds.
-- We need one augroup per client to make sure that multiple clients
-- can attach to the same buffer without interfering with each other.
local _augroups = {}
local get_augroup = function(client)
if not _augroups[client.id] then
local group_name = 'kickstart-lsp-format-' .. client.name
local id = vim.api.nvim_create_augroup(group_name, { clear = true })
_augroups[client.id] = id
end
-- Create an augroup that is used for managing our formatting autocmds.
-- We need one augroup per client to make sure that multiple clients
-- can attach to the same buffer without interfering with each other.
local _augroups = {}
local get_augroup = function(client)
if not _augroups[client.id] then
local group_name = "kickstart-lsp-format-" .. client.name
local id = vim.api.nvim_create_augroup(group_name, { clear = true })
_augroups[client.id] = id
end

return _augroups[client.id]
end
return _augroups[client.id]
end

-- Whenever an LSP attaches to a buffer, we will run this function.
--
-- See `:help LspAttach` for more information about this autocmd event.
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }),
-- This is where we attach the autoformatting for reasonable clients
callback = function(args)
local client_id = args.data.client_id
local client = vim.lsp.get_client_by_id(client_id)
local bufnr = args.buf
-- Whenever an LSP attaches to a buffer, we will run this function.
--
-- See `:help LspAttach` for more information about this autocmd event.
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-attach-format", { clear = true }),
-- This is where we attach the autoformatting for reasonable clients
callback = function(args)
local client_id = args.data.client_id
local client = vim.lsp.get_client_by_id(client_id)
local bufnr = args.buf

-- Only attach to clients that support document formatting
if not client.server_capabilities.documentFormattingProvider then
return
end
-- Only attach to clients that support document formatting
if not client.server_capabilities.documentFormattingProvider then
return
end

-- Tsserver usually works poorly. Sorry you work with bad languages
-- You can remove this line if you know what you're doing :)
if client.name == 'tsserver' then
return
end
-- Tsserver usually works poorly. Sorry you work with bad languages
-- You can remove this line if you know what you're doing :)
if client.name == "tsserver" then
return
end

-- Create an autocmd that will run *before* we save the buffer.
-- Run the formatting command for the LSP that has just attached.
vim.api.nvim_create_autocmd('BufWritePre', {
group = get_augroup(client),
buffer = bufnr,
callback = function()
if not format_is_enabled then
return
end
-- Create an autocmd that will run *before* we save the buffer.
-- Run the formatting command for the LSP that has just attached.
vim.api.nvim_create_autocmd("BufWritePre", {
group = get_augroup(client),
buffer = bufnr,
callback = function()
if not format_is_enabled then
return
end

vim.lsp.buf.format {
async = false,
filter = function(c)
return c.id == client.id
end,
}
end,
})
end,
})
end,
vim.lsp.buf.format({
async = false,
filter = function(c)
return c.id == client.id
end,
})
end,
})
end,
})
end,
}
134 changes: 67 additions & 67 deletions dots/nvim/lua/kickstart/plugins/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,81 @@
-- 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 = {
-- Creates a beautiful debugger UI
'rcarriga/nvim-dap-ui',
-- NOTE: Yes, you can install new plugins here!
"mfussenegger/nvim-dap",
-- NOTE: And you can specify dependencies as well
dependencies = {
-- Creates a beautiful debugger UI
"rcarriga/nvim-dap-ui",

-- Installs the debug adapters for you
'williamboman/mason.nvim',
'jay-babu/mason-nvim-dap.nvim',
-- Installs the debug adapters for you
"williamboman/mason.nvim",
"jay-babu/mason-nvim-dap.nvim",

-- Add your own debuggers here
'leoluz/nvim-dap-go',
},
config = function()
local dap = require 'dap'
local dapui = require 'dapui'
-- Add your own debuggers here
"leoluz/nvim-dap-go",
},
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,
require("mason-nvim-dap").setup({
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_setup = true,

-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},

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

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

-- 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 = '',
},
},
}
-- 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 = "",
},
},
})

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

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
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

-- Install golang specific config
require('dap-go').setup()
end,
-- Install golang specific config
require("dap-go").setup()
end,
}
Loading

0 comments on commit ebe0167

Please sign in to comment.