diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..32ee1f0 --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -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 . diff --git a/dots/nvim/init.lua b/dots/nvim/init.lua index 888fb9a..64a86a1 100644 --- a/dots/nvim/init.lua +++ b/dots/nvim/init.lua @@ -460,6 +460,7 @@ require("lazy").setup({ lspconfig.nil_ls.setup({}) lspconfig.rust_analyzer.setup({}) lspconfig.tailwindcss.setup({}) + lspconfig.yamlls.setup({}) end, }, @@ -664,6 +665,7 @@ require("lazy").setup({ "rust", "vim", "vimdoc", + "yaml", }, -- Autoinstall languages that are not installed auto_install = true, diff --git a/dots/nvim/lua/custom/plugins/dashboard.lua b/dots/nvim/lua/custom/plugins/dashboard.lua index b651ddd..c218743 100644 --- a/dots/nvim/lua/custom/plugins/dashboard.lua +++ b/dots/nvim/lua/custom/plugins/dashboard.lua @@ -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" } }, + }, } diff --git a/dots/nvim/lua/custom/plugins/git.lua b/dots/nvim/lua/custom/plugins/git.lua index 21ed1fc..41e1174 100644 --- a/dots/nvim/lua/custom/plugins/git.lua +++ b/dots/nvim/lua/custom/plugins/git.lua @@ -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", } diff --git a/dots/nvim/lua/custom/plugins/harpoon.lua b/dots/nvim/lua/custom/plugins/harpoon.lua index c9daf65..a1613c5 100644 --- a/dots/nvim/lua/custom/plugins/harpoon.lua +++ b/dots/nvim/lua/custom/plugins/harpoon.lua @@ -1,7 +1,7 @@ return { - { - "ThePrimeagen/harpoon", - branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim" } - } + { + "ThePrimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" }, + }, } diff --git a/dots/nvim/lua/custom/plugins/lsp.lua b/dots/nvim/lua/custom/plugins/lsp.lua index 9960bf4..de7eae7 100644 --- a/dots/nvim/lua/custom/plugins/lsp.lua +++ b/dots/nvim/lua/custom/plugins/lsp.lua @@ -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", + }, + }, } diff --git a/dots/nvim/lua/kickstart/plugins/autoformat.lua b/dots/nvim/lua/kickstart/plugins/autoformat.lua index bc56b15..d8b92ad 100644 --- a/dots/nvim/lua/kickstart/plugins/autoformat.lua +++ b/dots/nvim/lua/kickstart/plugins/autoformat.lua @@ -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, } diff --git a/dots/nvim/lua/kickstart/plugins/debug.lua b/dots/nvim/lua/kickstart/plugins/debug.lua index 7fc783f..a1228aa 100644 --- a/dots/nvim/lua/kickstart/plugins/debug.lua +++ b/dots/nvim/lua/kickstart/plugins/debug.lua @@ -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', '', dap.continue, { desc = 'Debug: Start/Continue' }) - vim.keymap.set('n', '', dap.step_into, { desc = 'Debug: Step Into' }) - vim.keymap.set('n', '', dap.step_over, { desc = 'Debug: Step Over' }) - vim.keymap.set('n', '', dap.step_out, { desc = 'Debug: Step Out' }) - vim.keymap.set('n', 'b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' }) - vim.keymap.set('n', '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", "", dap.continue, { desc = "Debug: Start/Continue" }) + vim.keymap.set("n", "", dap.step_into, { desc = "Debug: Step Into" }) + vim.keymap.set("n", "", dap.step_over, { desc = "Debug: Step Over" }) + vim.keymap.set("n", "", dap.step_out, { desc = "Debug: Step Out" }) + vim.keymap.set("n", "b", dap.toggle_breakpoint, { desc = "Debug: Toggle Breakpoint" }) + vim.keymap.set("n", "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', '', 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", "", 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, } diff --git a/flake.lock b/flake.lock index 32fabeb..038adce 100644 --- a/flake.lock +++ b/flake.lock @@ -177,11 +177,11 @@ "homebrew-cask": { "flake": false, "locked": { - "lastModified": 1710514179, - "narHash": "sha256-y0FW4aOe8IhkWN359erPuMLAH/ymKcMuBpl+IjN8JxI=", + "lastModified": 1710518253, + "narHash": "sha256-4YK4jR8SBNH/JpTecnx4sdTRn1nc60igVWo2ajYxCuM=", "owner": "homebrew", "repo": "homebrew-cask", - "rev": "dcf929a7e15df8074e2b3289833a8239563b7f5d", + "rev": "19595e4ed2e44f5d65cf6ba940acd88b6dcdb4c9", "type": "github" }, "original": { @@ -193,11 +193,11 @@ "homebrew-core": { "flake": false, "locked": { - "lastModified": 1710515153, - "narHash": "sha256-Vp1IN2hXZkn7GLZEOMfb4gLkw47DaJnEL8EdpdsNyLk=", + "lastModified": 1710519204, + "narHash": "sha256-zrVCmbLUrtNN9UnVi4Ch5eZ5g+BhdBCVRjgfikoXqfo=", "owner": "homebrew", "repo": "homebrew-core", - "rev": "b80ce9187045dc38082424bd291c1eabf7a89352", + "rev": "c48da2a7841695e3ca9e6ca2815f9ad1e6dc12ba", "type": "github" }, "original": { diff --git a/home/neovim.nix b/home/neovim.nix index d47feda..e5daaad 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -13,6 +13,7 @@ stylua tailwindcss-language-server vscode-langservers-extracted + yaml-language-server ]) ++ ( if config.os == "nixos" diff --git a/home/networking.nix b/home/networking.nix index efe7d8b..60be264 100644 --- a/home/networking.nix +++ b/home/networking.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { home.packages = with pkgs; [ tailscale ];