diff --git a/.config/nvim/lua/rocketcamel/plugins/lsp.lua b/.config/nvim/lua/rocketcamel/plugins/lsp.lua index d52e63e..94bfcc6 100644 --- a/.config/nvim/lua/rocketcamel/plugins/lsp.lua +++ b/.config/nvim/lua/rocketcamel/plugins/lsp.lua @@ -1,122 +1,122 @@ local function setup_luau() - require("luau-lsp").setup({ - platform = { - type = "roblox", - }, - types = { - roblox_security_level = "PluginSecurity", - }, - sourcemap = { - enabled = true, - autogenerate = true, - rojo_project_file = "default.project.json", - sourcemap_file = "sourcemap.json", - }, - plugin = { - enabled = true, - port = 3667, - }, - fflags = { - enable_new_solver = true, - sync = true, - }, - }) + require("luau-lsp").setup({ + platform = { + type = "roblox", + }, + types = { + roblox_security_level = "PluginSecurity", + }, + sourcemap = { + enabled = true, + autogenerate = true, + rojo_project_file = "default.project.json", + sourcemap_file = "sourcemap.json", + }, + plugin = { + enabled = true, + port = 3667, + }, + fflags = { + enable_new_solver = true, + sync = true, + }, + }) end return { - { - "neovim/nvim-lspconfig", - dependencies = { - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "j-hui/fidget.nvim", - "lopi-py/luau-lsp.nvim", - "hrsh7th/nvim-cmp", - "hrsh7th/cmp-cmdline", - "hrsh7th/cmp-path", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-nvim-lsp", - }, - config = function() - require("mason").setup() - require("fidget").setup({ - notification = { - window = { - winblend = 0, - }, - }, - }) - require("mason-lspconfig").setup({ - ensure_installed = { - "ts_ls", - "lua_ls", - "luau_lsp", - "rust_analyzer", - "nil_ls", - "tailwindcss", - "svelte", - "html", - "gopls", - "templ", - }, - automatic_enable = { exclude = { "luau_lsp" } }, - }) - setup_luau() - local cmp = require("cmp") - cmp.setup({ - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "luasnip" }, - }, { - { name = "buffer" }, - }), - }) - local capabilities = require("cmp_nvim_lsp").default_capabilities() - vim.lsp.config("*", { - capabilities = capabilities, - }) - vim.keymap.set("n", "gtd", vim.lsp.buf.definition) - vim.keymap.set("n", "ev", function() - vim.diagnostic.open_float({ border = "rounded" }) - end) - vim.keymap.set("n", "K", function() - vim.lsp.buf.hover({ border = "rounded" }) - end) - vim.keymap.set("i", "", function() - vim.lsp.buf.signature_help({ border = "rounded" }) - end) - vim.diagnostic.config({ virtual_text = true }) - cmp.setup.cmdline({ "/", "?" }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = "buffer" }, - }, - }) - cmp.setup.cmdline(":", { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = "path" }, - }, { - { name = "cmdline" }, - }), - matching = { disallow_symbol_nonprefix_matching = false }, - }) - end, - }, + { + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "j-hui/fidget.nvim", + "lopi-py/luau-lsp.nvim", + "hrsh7th/nvim-cmp", + "hrsh7th/cmp-cmdline", + "hrsh7th/cmp-path", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-nvim-lsp", + }, + config = function() + require("mason").setup() + require("fidget").setup({ + notification = { + window = { + winblend = 0, + }, + }, + }) + require("mason-lspconfig").setup({ + ensure_installed = { + "ts_ls", + "lua_ls", + "luau_lsp", + "rust_analyzer", + "nil_ls", + "tailwindcss", + "svelte", + "html", + "gopls", + "templ", + }, + automatic_enable = { exclude = { "luau_lsp" } }, + }) + setup_luau() + local cmp = require("cmp") + cmp.setup({ + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({ select = true }), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, + }, { + { name = "buffer" }, + }), + }) + local capabilities = require("cmp_nvim_lsp").default_capabilities() + vim.lsp.config("*", { + capabilities = capabilities, + }) + vim.keymap.set("n", "gtd", vim.lsp.buf.definition) + vim.keymap.set("n", "ev", function() + vim.diagnostic.open_float({ border = "rounded" }) + end) + vim.keymap.set("n", "K", function() + vim.lsp.buf.hover({ border = "rounded" }) + end) + vim.keymap.set("i", "", function() + vim.lsp.buf.signature_help({ border = "rounded" }) + end) + vim.diagnostic.config({ virtual_text = true }) + cmp.setup.cmdline({ "/", "?" }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = "buffer" }, + }, + }) + cmp.setup.cmdline(":", { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = "path" }, + }, { + { name = "cmdline" }, + }), + matching = { disallow_symbol_nonprefix_matching = false }, + }) + end, + }, } diff --git a/.config/vinegar/config.toml b/.config/vinegar/config.toml new file mode 100644 index 0000000..e69de29 diff --git a/.config/vinegar/overlays/studio/Plugins/Rojo.rbxm b/.config/vinegar/overlays/studio/Plugins/Rojo.rbxm new file mode 100644 index 0000000..148e3f9 Binary files /dev/null and b/.config/vinegar/overlays/studio/Plugins/Rojo.rbxm differ diff --git a/.stow-local-ignore b/.stow-local-ignore index 11081ed..aebb568 100755 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -1,4 +1,6 @@ .git .gitignore +aliases custom +astal nix diff --git a/nix/homelab/kube-hardware-configuration.nix b/nix/homelab/kube-hardware-configuration.nix index 8fecc28..e128e8b 100644 --- a/nix/homelab/kube-hardware-configuration.nix +++ b/nix/homelab/kube-hardware-configuration.nix @@ -1,12 +1,24 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ ]; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "nvme" "sr_mod" ]; + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "ehci_pci" + "nvme" + "sr_mod" + ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; diff --git a/nix/hosts/kumatani/hardware-configuration.nix b/nix/hosts/kumatani/hardware-configuration.nix index ca68748..60a7074 100644 --- a/nix/hosts/kumatani/hardware-configuration.nix +++ b/nix/hosts/kumatani/hardware-configuration.nix @@ -1,28 +1,44 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/d751775f-e83d-4230-9228-d1b58c5cc534"; - fsType = "btrfs"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/d751775f-e83d-4230-9228-d1b58c5cc534"; + fsType = "btrfs"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5C2F-86EC"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/5C2F-86EC"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; swapDevices = [ ]; diff --git a/nix/modules/default.nix b/nix/modules/default.nix index a5c4575..e16ab4e 100644 --- a/nix/modules/default.nix +++ b/nix/modules/default.nix @@ -14,5 +14,6 @@ ./keys.nix ./rofi.nix ./desktop.nix + ./zed-editor.nix ]; } diff --git a/nix/modules/desktop.nix b/nix/modules/desktop.nix index 8eff1f9..600b4d3 100644 --- a/nix/modules/desktop.nix +++ b/nix/modules/desktop.nix @@ -38,6 +38,7 @@ wl-clip-persist wdisplays efibootmgr + nixd ]; programs.thunar.enable = true; programs.hyprland = { @@ -51,6 +52,7 @@ }; rofi.enable = true; services.upower.enable = true; + zed.enable = true; home-manager.users.luca = { programs = { diff --git a/nix/modules/zed-editor.nix b/nix/modules/zed-editor.nix new file mode 100644 index 0000000..977a85b --- /dev/null +++ b/nix/modules/zed-editor.nix @@ -0,0 +1,84 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + options.zed = { + enable = lib.mkEnableOption "enable zed"; + }; + + config = lib.mkIf config.zed.enable { + home-manager.users.luca = { + programs.zed-editor = { + enable = true; + extraPackages = with pkgs; [ nixd ]; + extensions = [ + "luau" + "nix" + "rose-pine-theme" + ]; + userSettings = { + features = { + edit_prediction_provider = "none"; + }; + edit_predictions = null; + vim_mode = true; + ui_font_size = 16; + buffer_font_size = 16; + theme = { + mode = "dark"; + dark = "Rosé Pine"; + }; + diagnostics = { + inline = { + enabled = true; + }; + }; + format_on_save = "on"; + lsp = { + "luau-lsp" = { + settings = { + ext = { + roblox = { + enabled = true; + security_level = "plugin"; + }; + fflags = { + enable_new_solver = true; + sync = true; + }; + }; + }; + }; + nixd = { + initialization_options = { + formatting = { + command = [ + "nixfmt" + "--quiet" + "--" + ]; + }; + }; + }; + }; + languages = { + Luau = { + formatter = { + external = { + command = "stylua"; + arguments = [ "-" ]; + }; + }; + }; + Nix = { + language_servers = [ "nixd" ]; + }; + }; + }; + }; + }; + }; +}