From fbfc821c8b0b7bc676f4bb1e68c7e52666c9f75c Mon Sep 17 00:00:00 2001 From: fqbn207 Date: Thu, 16 Jan 2025 19:19:22 +0100 Subject: [PATCH] kekl --- modules/home/nix/alacritty.nix | 2 +- modules/home/nix/nixvim/cmp.nix | 121 ------------------ modules/home/nix/nixvim/default.nix | 42 ------ modules/home/nix/nixvim/dev.nix | 17 --- modules/home/nix/nixvim/lsp.nix | 98 -------------- modules/home/nix/nixvim/lualine.nix | 10 -- modules/home/nix/nixvim/neotree.nix | 22 ---- modules/home/nix/nixvim/nonels.nix | 63 --------- modules/home/nix/nixvim/opts.nix | 46 ------- modules/home/nix/nixvim/treesitter.nix | 31 ----- modules/home/nix/tmux.nix | 9 +- modules/system/nix/default.nix | 1 + modules/system/nix/nvim/lualine.nix | 10 ++ .../system/nix/x/dwm/source/dwm/config.def.h | 12 +- modules/system/nix/x/slstatus/default.nix | 6 + modules/system/nix/x/slstatus/source/slstatus | 1 + 16 files changed, 29 insertions(+), 462 deletions(-) delete mode 100644 modules/home/nix/nixvim/cmp.nix delete mode 100644 modules/home/nix/nixvim/default.nix delete mode 100644 modules/home/nix/nixvim/dev.nix delete mode 100644 modules/home/nix/nixvim/lsp.nix delete mode 100644 modules/home/nix/nixvim/lualine.nix delete mode 100644 modules/home/nix/nixvim/neotree.nix delete mode 100644 modules/home/nix/nixvim/nonels.nix delete mode 100644 modules/home/nix/nixvim/opts.nix delete mode 100644 modules/home/nix/nixvim/treesitter.nix create mode 100644 modules/system/nix/x/slstatus/default.nix create mode 160000 modules/system/nix/x/slstatus/source/slstatus diff --git a/modules/home/nix/alacritty.nix b/modules/home/nix/alacritty.nix index 4481564..8dba460 100644 --- a/modules/home/nix/alacritty.nix +++ b/modules/home/nix/alacritty.nix @@ -20,7 +20,7 @@ colors = { primary = { foreground = "#FFFFFF"; - background = "#121212"; + background = "#262626"; }; }; }; diff --git a/modules/home/nix/nixvim/cmp.nix b/modules/home/nix/nixvim/cmp.nix deleted file mode 100644 index 3225b46..0000000 --- a/modules/home/nix/nixvim/cmp.nix +++ /dev/null @@ -1,121 +0,0 @@ -_: -let - get_bufnrs.__raw = '' - function() - local buf_size_limit = 1024 * 1024 -- 1MB size limit - local bufs = vim.api.nvim_list_bufs() - local valid_bufs = {} - for _, buf in ipairs(bufs) do - if vim.api.nvim_buf_is_loaded(buf) and vim.api.nvim_buf_get_offset(buf, vim.api.nvim_buf_line_count(buf)) < buf_size_limit then - table.insert(valid_bufs, buf) - end - end - return valid_bufs - end - ''; -in -{ - programs.nixvim.plugins = { - cmp = { - enable = true; - autoEnableSources = true; - settings = { - window = { - completion = { - autocomplete = true; - col_offset = -3; - side_padding = 0; - }; - }; - completion = { - completeopt = "menu,menuone,noinsert,noselect"; - keyword_length = 1; - }; - sorting = { - }; - mapping = { - "".__raw = '' - cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - else - fallback() - end - end, { "i", "s" }) - ''; - - "".__raw = '' - cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - else - fallback() - end - end, { "i", "s" }) - ''; - "" = "cmp.mapping.scroll_docs(-4)"; - "" = "cmp.mapping.scroll_docs(4)"; - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping.abort()"; - "" = "cmp.mapping.confirm({ select = false })"; - }; - - preselect = "cmp.PreselectMode.None"; - snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; - - sources = [ - { - name = "nvim_lsp"; - priority = 1000; - option = { - inherit get_bufnrs; - }; - } - { - name = "nvim_lsp_document_symbol"; - priority = 1000; - option = { - inherit get_bufnrs; - }; - } - { - name = "treesitter"; - priority = 850; - option = { - inherit get_bufnrs; - }; - } - { - name = "path"; - priority = 300; - } - ]; - }; - }; - - friendly-snippets.enable = true; - luasnip.enable = true; - - lspkind = { - enable = true; - cmp = { - enable = true; - menu = { - buffer = ""; - calc = ""; - cmdline = ""; - codeium = "󱜙"; - emoji = "󰞅"; - git = ""; - luasnip = "󰩫"; - neorg = ""; - nvim_lsp = ""; - nvim_lua = ""; - path = ""; - spell = ""; - treesitter = "󰔱"; - }; - }; - }; - }; -} diff --git a/modules/home/nix/nixvim/default.nix b/modules/home/nix/nixvim/default.nix deleted file mode 100644 index 9035811..0000000 --- a/modules/home/nix/nixvim/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - config, - pkgs, - nixvim, - ... -}: -let - nixvim = import ( - builtins.fetchGit { - url = "https://github.com/nix-community/nixvim"; - } - ); -in -{ - imports = [ - nixvim.homeManagerModules.nixvim - ./cmp.nix - ./lsp.nix - ./neotree.nix - ./opts.nix - ./dev.nix - ./nonels.nix - ./treesitter.nix - ./lualine.nix - ]; - programs.nixvim = { - enable = true; - colorschemes.oxocarbon.enable = true; - plugins = { - neocord = { - enable = true; - settings = { - auto_update = true; - global_timer = true; - log_level = null; - show_time = true; - workspace_text = "WS: %s"; - }; - }; - }; - }; -} diff --git a/modules/home/nix/nixvim/dev.nix b/modules/home/nix/nixvim/dev.nix deleted file mode 100644 index a45e4b3..0000000 --- a/modules/home/nix/nixvim/dev.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - pkgs, - nixvim, - ... -}: -{ - programs.nixvim = { - plugins = { - toggleterm.enable = true; - autoclose.enable = true; - web-devicons.enable = true; - which-key.enable = true; - trouble.enable = true; - }; - }; -} diff --git a/modules/home/nix/nixvim/lsp.nix b/modules/home/nix/nixvim/lsp.nix deleted file mode 100644 index 9877254..0000000 --- a/modules/home/nix/nixvim/lsp.nix +++ /dev/null @@ -1,98 +0,0 @@ -{ - config, - pkgs, - nixvim, - ... -}: -{ - programs.nixvim.plugins = { - clangd-extensions.enable = true; - crates.enable = true; - lsp-format = { - enable = true; - }; - lsp = { - enable = true; - inlayHints = true; - servers = { - csharp_ls = { - enable = true; - autostart = true; - }; - bashls = { - enable = true; - autostart = true; - }; - html = { - enable = true; - autostart = true; - }; - lua_ls = { - enable = true; - autostart = true; - }; - nixd = { - enable = true; - extraOptions = { - nixos = { - expr = "(builtins.getFlake \"/etc/nixos\").nixosConfigurations.aurelionite.options"; - }; - home_manager = { - expr = "(builtins.getFlake \"/etc/nixos\").homeConfigurations.aurelionite.options"; - }; - }; - }; - asm_lsp = { - enable = true; - autostart = true; - }; - pyright = { - enable = true; - autostart = true; - }; - gopls = { - enable = true; - autostart = true; - }; - clangd = { - enable = true; - autostart = true; - }; - omnisharp = { - enable = true; - autostart = true; - }; - arduino_language_server = { - enable = true; - autostart = true; - }; - }; - }; - rustaceanvim = { - enable = true; - settings = { - server = { - cmd = [ - "rustup" - "run" - "nightly" - "rust-analyzer" - ]; - default_settings = { - rust-analyzer = { - check = { - command = "clippy"; - }; - inlayHints = { - lifetimeElisionHints = { - enable = "always"; - }; - }; - }; - }; - standalone = false; - }; - }; - }; - }; -} diff --git a/modules/home/nix/nixvim/lualine.nix b/modules/home/nix/nixvim/lualine.nix deleted file mode 100644 index 6a69eaf..0000000 --- a/modules/home/nix/nixvim/lualine.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, ... }: -{ - programs.nixvim = { - plugins = { - lualine = { - enable = true; - }; - }; - }; -} diff --git a/modules/home/nix/nixvim/neotree.nix b/modules/home/nix/nixvim/neotree.nix deleted file mode 100644 index cae5681..0000000 --- a/modules/home/nix/nixvim/neotree.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - pkgs, - nixvim, - ... -}: -{ - programs.nixvim = { - plugins = { - neo-tree = { - enable = true; - enableDiagnostics = true; - enableGitStatus = true; - closeIfLastWindow = true; - window = { - position = "right"; - width = 40; - }; - }; - }; - }; -} diff --git a/modules/home/nix/nixvim/nonels.nix b/modules/home/nix/nixvim/nonels.nix deleted file mode 100644 index 7fe382f..0000000 --- a/modules/home/nix/nixvim/nonels.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ pkgs, ... }: -{ - programs.nixvim.plugins.none-ls = { - enable = true; - enableLspFormat = true; - settings = { - updateInInsert = false; - }; - - sources = { - code_actions = { - gitsigns.enable = true; - statix.enable = true; - }; - diagnostics = { - statix.enable = true; - yamllint.enable = true; - }; - formatting = { - nixfmt = { - enable = true; - package = pkgs.nixfmt-rfc-style; - }; - black = { - enable = true; - settings = '' - { - extra_args = { "--fast" }, - } - ''; - }; - prettier = { - enable = true; - disableTsServerFormatter = true; - settings = '' - { - extra_args = { "--no-semi" }, - } - ''; - }; - stylua.enable = true; - yamlfmt = { - enable = true; - }; - hclfmt.enable = true; - }; - }; - }; - programs.nixvim.keymaps = [ - { - mode = [ - "n" - "v" - ]; - key = "cf"; - action = "lua vim.lsp.buf.format()"; - options = { - silent = true; - desc = "Format"; - }; - } - ]; -} diff --git a/modules/home/nix/nixvim/opts.nix b/modules/home/nix/nixvim/opts.nix deleted file mode 100644 index 64f0b8e..0000000 --- a/modules/home/nix/nixvim/opts.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - config, - pkgs, - nixvim, - ... -}: -{ - programs.nixvim = { - extraConfigLua = '' - local map = vim.api.nvim_set_keymap - local opts = { noremap = true, silent = true } - vim.g.mapleader = " " - map('n', '', ":ToggleTerm size=40 direction=float", opts) - map('n', '', ":Neotree filesystem reveal right toggle", opts) - - map('v', '', '>gv', opts) - map('v', '', '