diff --git a/flake.lock b/flake.lock index e3ef237..6430d11 100644 --- a/flake.lock +++ b/flake.lock @@ -27,6 +27,27 @@ "type": "github" } }, + "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1751438379, + "narHash": "sha256-0u0rFAkdUIexx8r7+TkGjUsmauK6kKQ/RtE7vCEwLLE=", + "owner": "nix-community", + "repo": "fenix", + "rev": "9d776d59084355be7d187a047f64c36664249c4d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -172,6 +193,26 @@ "type": "github" } }, + "nil": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751341694, + "narHash": "sha256-zXag1+8iZC3H5yVFP7KhIi4ps9z8xKrFIkyaeXlZ7Uo=", + "owner": "oxalica", + "repo": "nil", + "rev": "b043bfe1f3f4c4be4b688e24c5ae96e81f525805", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "nil", + "type": "github" + } + }, "nix": { "inputs": { "flake-compat": "flake-compat_2", @@ -314,13 +355,32 @@ "root": { "inputs": { "agenix": "agenix", + "fenix": "fenix", "ghostty": "ghostty", "home-manager": "home-manager", + "nil": "nil", "nix": "nix", "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs_2" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1751377982, + "narHash": "sha256-eqf9Bxe3uBNG4xwcteIKt855wHuT+j6orPiABQ83dDw=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "aa16885e6282a540ecfbffa0d886ed9904b425bc", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 22b39b4..32d5418 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,14 @@ ghostty = { url = "github:ghostty-org/ghostty"; }; + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nil = { + url = "github:oxalica/nil"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # wrapper-manager = { # url = "github:viperML/wrapper-manager"; # inputs.nixpkgs.follows = "nixpkgs"; @@ -29,7 +37,7 @@ outputs = inputs@{ self, nixpkgs, nix-darwin, nix, ... }: let inherit (builtins) readDir; - inherit (nixpkgs.lib) attrsToList const groupBy listToAttrs mapAttrs last mkOption splitString; + inherit (nixpkgs.lib) attrsToList const groupBy listToAttrs mapAttrs; #nix.enable = false; lib = nixpkgs.lib // nix-darwin.lib; diff --git a/hosts/thegeneralist-central-mbp/configuration.nix b/hosts/thegeneralist-central-mbp/configuration.nix index 88615ef..9f8c03a 100644 --- a/hosts/thegeneralist-central-mbp/configuration.nix +++ b/hosts/thegeneralist-central-mbp/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ self, config, pkgs, lib, inputs, ... }: +{ pkgs, ... }: { imports = [ ./hardware-configuration.nix ]; diff --git a/hosts/thegeneralist-central/configuration.nix b/hosts/thegeneralist-central/configuration.nix index fa29b9c..4c0ad22 100644 --- a/hosts/thegeneralist-central/configuration.nix +++ b/hosts/thegeneralist-central/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ self, config, pkgs, lib, inputs, ... }: +{ config, pkgs, inputs, ... }: { imports = [ ./hardware-configuration.nix ./site.nix ./cache ]; diff --git a/hosts/thegeneralist-central/hardware-configuration.nix b/hosts/thegeneralist-central/hardware-configuration.nix index ae40e94..140ee9f 100644 --- a/hosts/thegeneralist-central/hardware-configuration.nix +++ b/hosts/thegeneralist-central/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ lib, ... }: { boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; diff --git a/hosts/thegeneralist-mbp/aerospace.nix b/hosts/thegeneralist-mbp/aerospace.nix index 937a0c5..5b1e6ba 100644 --- a/hosts/thegeneralist-mbp/aerospace.nix +++ b/hosts/thegeneralist-mbp/aerospace.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ system.primaryUser = "thegeneralist"; # TODO: explore this. diff --git a/hosts/thegeneralist-mbp/configuration.nix b/hosts/thegeneralist-mbp/configuration.nix index 87c2b2e..48c5209 100644 --- a/hosts/thegeneralist-mbp/configuration.nix +++ b/hosts/thegeneralist-mbp/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ self, config, pkgs, lib, inputs, ... }: +{ pkgs, ... }: { imports = [ ./hardware-configuration.nix ./aerospace.nix ]; diff --git a/hosts/thegeneralist/configuration.nix b/hosts/thegeneralist/configuration.nix index 7d8d3b1..b27c9f8 100644 --- a/hosts/thegeneralist/configuration.nix +++ b/hosts/thegeneralist/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ self, config, pkgs, lib, inputs, ... }: +{ config, pkgs, inputs, ... }: { imports = [ ./hardware-configuration.nix ]; diff --git a/hosts/thegeneralist/hardware-configuration.nix b/hosts/thegeneralist/hardware-configuration.nix index 1d85655..8ad07a1 100644 --- a/hosts/thegeneralist/hardware-configuration.nix +++ b/hosts/thegeneralist/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, modulesPath, ... }: { imports = diff --git a/modules/common/dns-options.nix b/modules/common/dns-options.nix index 6614afb..8375b5d 100644 --- a/modules/common/dns-options.nix +++ b/modules/common/dns-options.nix @@ -1,4 +1,4 @@ -{ lib, options, ... }: let +{ lib, ... }: let inherit (lib) mkOption; in { options.dnsServers = mkOption { diff --git a/modules/common/git.nix b/modules/common/git.nix index 3cfc417..a5e2571 100644 --- a/modules/common/git.nix +++ b/modules/common/git.nix @@ -1,5 +1,5 @@ -{ lib, pkgs, config, ... }: let - inherit (lib) optionalAttrs getExe; +{ lib, pkgs, ... }: let + inherit (lib) getExe; in { environment.systemPackages = with pkgs; [ gnupg diff --git a/modules/common/nix.nix b/modules/common/nix.nix index ca90321..43178c6 100644 --- a/modules/common/nix.nix +++ b/modules/common/nix.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ...}: let +{ config, pkgs, ...}: let subs = [ "https://cache.thegeneralist01.com/" "https://cache.garnix.io/" diff --git a/modules/common/nushell/default.nix b/modules/common/nushell/default.nix index a9e8e63..1690b10 100644 --- a/modules/common/nushell/default.nix +++ b/modules/common/nushell/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, wrapper-manager, ... }: let +{ config, pkgs, lib, ... }: let inherit (lib) readFile getExe mkIf optionalAttrs; in { # TODO: starship + change the zoxide src diff --git a/modules/common/rust.nix b/modules/common/rust.nix new file mode 100644 index 0000000..2bd9928 --- /dev/null +++ b/modules/common/rust.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: { + # TODO: install nil (nix language server) + # TODO: check these out: https://github.com/RGBCube/ncc/blob/86212e148b2642a51814e873a81be73fbc494e86/modules/common/rust.nix#L15-L24 + environment.systemPackages = with pkgs; [ + (fenix.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + rust-analyzer-nightly + + # for nil + nil + nixfmt-rfc-style + ]; + + # home-manager.sharedModules = [{ + # extraWrapperArgs = [ + # "--suffix" + # "LIBRARY_PATH" + # ":" + # "${lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.zlib ]}" + # "--suffix" + # "PKG_CONFIG_PATH" + # ":" + # "${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [ pkgs.stdenv.cc.cc pkgs.zlib ]}" + # ]; + # }]; +} diff --git a/modules/common/tailscale.nix b/modules/common/tailscale.nix index 5d22716..9b0cd4a 100644 --- a/modules/common/tailscale.nix +++ b/modules/common/tailscale.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{ services.tailscale = { enable = true; }; diff --git a/modules/darwin/karabiner.nix b/modules/darwin/karabiner.nix index 49e690c..c86c75c 100644 --- a/modules/darwin/karabiner.nix +++ b/modules/darwin/karabiner.nix @@ -1,4 +1,4 @@ -{ lib, ... }: let +let numbers = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "0" ]; diff --git a/modules/darwin/ssh.nix b/modules/darwin/ssh.nix index 9ed14dd..dbaf6f1 100644 --- a/modules/darwin/ssh.nix +++ b/modules/darwin/ssh.nix @@ -1,15 +1,13 @@ -# TODO: this -# { lib, ... }: let -# sshOptions = { -# PermitRootLogin = "no"; -# PasswordAuthentication = "no"; -# }; -# in { -# services.openssh = { -# enable = true; -# extraConfig = sshOptions -# |> lib.mapAttrsToList (name: value: "${name} ${value}") -# |> lib.concatStringsSep "\n"; -# }; -# } -{} +{ lib, ... }: let + sshOptions = { + PermitRootLogin = "no"; + PasswordAuthentication = "no"; + }; +in { + services.openssh = { + enable = true; + extraConfig = sshOptions + |> lib.mapAttrsToList (name: value: "${name} ${value}") + |> lib.concatStringsSep "\n"; + }; +} diff --git a/modules/dotfiles/nvim/lua/thegeneralist/lazy/lsp.lua b/modules/dotfiles/nvim/lua/thegeneralist/lazy/lsp.lua index a3d523c..c7bf665 100644 --- a/modules/dotfiles/nvim/lua/thegeneralist/lazy/lsp.lua +++ b/modules/dotfiles/nvim/lua/thegeneralist/lazy/lsp.lua @@ -1,286 +1,287 @@ return { - { - "neovim/nvim-lspconfig", - dependencies = { - "saghen/blink.cmp", - -- "folke/neodev.nvim", - "williamboman/mason.nvim", - "mason-org/mason-registry", - "williamboman/mason-lspconfig.nvim", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - -- "hrsh7th/nvim-cmp", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - "j-hui/fidget.nvim", - }, - config = function() - local lspkind = require("lspkind") - -- local cmp = require("cmp") - -- local cmp_lsp = require("cmp_nvim_lsp") - -- local capabilities = vim.tbl_deep_extend( - -- "force", - -- {}, - -- vim.lsp.protocol.make_client_capabilities(), - -- cmp_lsp.default_capabilities() - -- ) + { + "neovim/nvim-lspconfig", + dependencies = { + "saghen/blink.cmp", + -- "folke/neodev.nvim", + "williamboman/mason.nvim", + "mason-org/mason-registry", + "williamboman/mason-lspconfig.nvim", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + -- "hrsh7th/nvim-cmp", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + "j-hui/fidget.nvim", + }, + config = function() + local lspkind = require("lspkind") + -- local cmp = require("cmp") + -- local cmp_lsp = require("cmp_nvim_lsp") + -- local capabilities = vim.tbl_deep_extend( + -- "force", + -- {}, + -- vim.lsp.protocol.make_client_capabilities(), + -- cmp_lsp.default_capabilities() + -- ) - require("fidget").setup({}) - require("mason").setup() + require("fidget").setup({}) + require("mason").setup() - -- local vue_typescript_plugin = require("mason-registry") - -- .get_package("vue-language-server") - -- :get_install_path() .. "/node_modules/@vue/language-server" .. "/node_modules/@vue/typescript-plugin" + -- local vue_typescript_plugin = require("mason-registry") + -- .get_package("vue-language-server") + -- :get_install_path() .. "/node_modules/@vue/language-server" .. "/node_modules/@vue/typescript-plugin" - local capabilities = require("blink.cmp").get_lsp_capabilities() - require("mason-lspconfig").setup({ - automatic_enable = true, - ensure_installed = { - "lua_ls", - "rust_analyzer", - "ts_ls", - "cssls", - "tailwindcss", - "pyright", - }, - handlers = { - function(server_name) -- default handler (optional) - -- if server_name == "rust_analyzer" then - -- return - -- end - require("lspconfig")[server_name].setup({ - capabilities = capabilities, - }) - end, + local capabilities = require("blink.cmp").get_lsp_capabilities() + vim.lsp.enable("nil_ls") + require("mason-lspconfig").setup({ + automatic_enable = true, + ensure_installed = { + "lua_ls", + "rust_analyzer", + "ts_ls", + "cssls", + "tailwindcss", + "pyright", + }, + handlers = { + function(server_name) -- default handler (optional) + -- if server_name == "rust_analyzer" then + -- return + -- end + require("lspconfig")[server_name].setup({ + capabilities = capabilities, + }) + end, - ["lua_ls"] = function() - local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup({ - capabilities = capabilities, - settings = { - Lua = { - diagnostics = { - globals = { "vim", "it", "describe", "before_each", "after_each" }, - }, - }, - }, - }) - end, + ["lua_ls"] = function() + local lspconfig = require("lspconfig") + lspconfig.lua_ls.setup({ + capabilities = capabilities, + settings = { + Lua = { + diagnostics = { + globals = { "vim", "it", "describe", "before_each", "after_each" }, + }, + }, + }, + }) + end, - ["ts_ls"] = function() - local lspconfig = require("lspconfig") - lspconfig.ts_ls.setup({ - capabilities = capabilities, - -- settings = { - -- }, - -- init_options = { - -- plugins = { - -- { - -- name = "@vue/typescript-plugin", - -- location = vue_typescript_plugin, - -- languages = { "vue" }, - -- }, - -- }, - -- }, - filetypes = { - "javascript", - "javascriptreact", - "javascript.jsx", - "typescript", - "typescriptreact", - "typescript.tsx", - -- "vue", - }, - }) - end, - }, - }) + ["ts_ls"] = function() + local lspconfig = require("lspconfig") + lspconfig.ts_ls.setup({ + capabilities = capabilities, + -- settings = { + -- }, + -- init_options = { + -- plugins = { + -- { + -- name = "@vue/typescript-plugin", + -- location = vue_typescript_plugin, + -- languages = { "vue" }, + -- }, + -- }, + -- }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + -- "vue", + }, + }) + end, + }, + }) - vim.api.nvim_create_autocmd("LspAttach", { - callback = function(args) - local c = vim.lsp.get_client_by_id(args.data.client_id) - if not c then - return - end + vim.api.nvim_create_autocmd("LspAttach", { + callback = function(args) + local c = vim.lsp.get_client_by_id(args.data.client_id) + if not c then + return + end - if vim.bo.filetype == "lua" then - -- Format the current buffer on save - vim.api.nvim_create_autocmd("BufWritePre", { - buffer = args.buf, - callback = function() - vim.lsp.buf.format({ bufnr = args.buf, id = c.id }) - end, - }) - end - end, - }) + if vim.bo.filetype == "lua" then + -- Format the current buffer on save + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = args.buf, + callback = function() + vim.lsp.buf.format({ bufnr = args.buf, id = c.id }) + end, + }) + end + end, + }) - -- local cmp_select = { behavior = cmp.SelectBehavior.Select } + -- local cmp_select = { behavior = cmp.SelectBehavior.Select } - --- Select item next/prev, taking into account whether the cmp window is - --- top-down or bottoom-up so that the movement is always in the same direction. - -- local select_item_smart = function(dir, opts) - -- return function(fallback) - -- if cmp.visible() then - -- opts = opts or { behavior = cmp.SelectBehavior.Select } - -- if cmp.core.view.custom_entries_view:is_direction_top_down() then - -- ({ next = cmp.select_next_item, prev = cmp.select_prev_item })[dir](opts) - -- else - -- ({ prev = cmp.select_next_item, next = cmp.select_prev_item })[dir](opts) - -- end - -- else - -- fallback() - -- end - -- end - -- end + --- Select item next/prev, taking into account whether the cmp window is + --- top-down or bottoom-up so that the movement is always in the same direction. + -- local select_item_smart = function(dir, opts) + -- return function(fallback) + -- if cmp.visible() then + -- opts = opts or { behavior = cmp.SelectBehavior.Select } + -- if cmp.core.view.custom_entries_view:is_direction_top_down() then + -- ({ next = cmp.select_next_item, prev = cmp.select_prev_item })[dir](opts) + -- else + -- ({ prev = cmp.select_next_item, next = cmp.select_prev_item })[dir](opts) + -- end + -- else + -- fallback() + -- end + -- end + -- end - -- cmp.setup({ - -- snippet = { - -- expand = function(args) - -- require("luasnip").lsp_expand(args.body) -- For `luasnip` users. - -- end, - -- }, - -- completion = { - -- completeopt = "menu,menuone,noinsert", - -- }, - -- -- No idea what this is - -- matching = { - -- disallow_fuzzy_matching = false, - -- disallow_fullfuzzy_matching = false, - -- disallow_partial_fuzzy_matching = false, - -- }, - -- performance = { - -- -- debounce = 50, - -- debounce = 25, - -- -- max_view_entries = 20, - -- }, - -- That crazy window - -- window = { - -- completion = cmp.config.window.bordered({ - -- border = "single", - -- side_padding = 2, - -- col_offset = -3, - -- max_width = 80, - -- }), - -- documentation = cmp.config.window.bordered({ - -- max_width = 50, - -- }), - -- }, - -- mapping = cmp.mapping.preset.insert({ - -- [""] = select_item_smart("prev", cmp_select), - -- [""] = select_item_smart("next", cmp_select), - -- [""] = cmp.mapping.close(), - -- [""] = cmp.mapping.confirm({ select = true }), - -- [""] = cmp.mapping.confirm({ select = true }), - -- [""] = cmp.mapping.complete(), - -- [""] = cmp.mapping.scroll_docs(-3), - -- [""] = cmp.mapping.scroll_docs(3), - -- [""] = cmp.mapping.abort(), - -- }), - -- sorting = { - -- comparators = { - -- cmp.config.compare.locality, - -- cmp.config.compare.offset, - -- cmp.config.compare.recently_used, - -- cmp.config.compare.exact, - -- cmp.config.compare.order, - -- cmp.config.compare.length, - -- function(entry1, entry2) - -- local _, entry1_under = entry1.completion_item.label:find("^_+") - -- local _, entry2_under = entry2.completion_item.label:find("^_+") - -- entry1_under = entry1_under or 0 - -- entry2_under = entry2_under or 0 - -- if entry1_under > entry2_under then - -- return false - -- elseif entry1_under < entry2_under then - -- return true - -- end - -- end, - -- cmp.config.compare.kind, - -- cmp.config.compare.sort_text, - -- }, - -- }, - -- sources = cmp.config.sources({ - -- { name = "neopyter" }, - -- { name = "nvim_lsp" }, - -- { name = "codeium" }, - -- { name = "luasnip" }, -- For luasnip users. - -- }, { - -- { name = "buffer" }, - -- }), - -- formatting = { - -- fields = { - -- "abbr", - -- "kind", - -- "menu", - -- }, - -- expandable_indicator = true, - -- format = lspkind.cmp_format({ - -- mode = "symbol_text", - -- maxwidth = 50, - -- ellipsis_char = "...", - -- menu = { - -- neopyter = "[Neopyter]", - -- }, - -- symbol_map = { - -- -- specific complete item kind icon - -- ["Magic"] = "🪄", - -- ["Path"] = "📁", - -- ["Dict key"] = "🔑", - -- ["Instance"] = "󱃻", - -- ["Statement"] = "󱇯", - -- }, - -- }), - -- }, - -- }) + -- cmp.setup({ + -- snippet = { + -- expand = function(args) + -- require("luasnip").lsp_expand(args.body) -- For `luasnip` users. + -- end, + -- }, + -- completion = { + -- completeopt = "menu,menuone,noinsert", + -- }, + -- -- No idea what this is + -- matching = { + -- disallow_fuzzy_matching = false, + -- disallow_fullfuzzy_matching = false, + -- disallow_partial_fuzzy_matching = false, + -- }, + -- performance = { + -- -- debounce = 50, + -- debounce = 25, + -- -- max_view_entries = 20, + -- }, + -- That crazy window + -- window = { + -- completion = cmp.config.window.bordered({ + -- border = "single", + -- side_padding = 2, + -- col_offset = -3, + -- max_width = 80, + -- }), + -- documentation = cmp.config.window.bordered({ + -- max_width = 50, + -- }), + -- }, + -- mapping = cmp.mapping.preset.insert({ + -- [""] = select_item_smart("prev", cmp_select), + -- [""] = select_item_smart("next", cmp_select), + -- [""] = cmp.mapping.close(), + -- [""] = cmp.mapping.confirm({ select = true }), + -- [""] = cmp.mapping.confirm({ select = true }), + -- [""] = cmp.mapping.complete(), + -- [""] = cmp.mapping.scroll_docs(-3), + -- [""] = cmp.mapping.scroll_docs(3), + -- [""] = cmp.mapping.abort(), + -- }), + -- sorting = { + -- comparators = { + -- cmp.config.compare.locality, + -- cmp.config.compare.offset, + -- cmp.config.compare.recently_used, + -- cmp.config.compare.exact, + -- cmp.config.compare.order, + -- cmp.config.compare.length, + -- function(entry1, entry2) + -- local _, entry1_under = entry1.completion_item.label:find("^_+") + -- local _, entry2_under = entry2.completion_item.label:find("^_+") + -- entry1_under = entry1_under or 0 + -- entry2_under = entry2_under or 0 + -- if entry1_under > entry2_under then + -- return false + -- elseif entry1_under < entry2_under then + -- return true + -- end + -- end, + -- cmp.config.compare.kind, + -- cmp.config.compare.sort_text, + -- }, + -- }, + -- sources = cmp.config.sources({ + -- { name = "neopyter" }, + -- { name = "nvim_lsp" }, + -- { name = "codeium" }, + -- { name = "luasnip" }, -- For luasnip users. + -- }, { + -- { name = "buffer" }, + -- }), + -- formatting = { + -- fields = { + -- "abbr", + -- "kind", + -- "menu", + -- }, + -- expandable_indicator = true, + -- format = lspkind.cmp_format({ + -- mode = "symbol_text", + -- maxwidth = 50, + -- ellipsis_char = "...", + -- menu = { + -- neopyter = "[Neopyter]", + -- }, + -- symbol_map = { + -- -- specific complete item kind icon + -- ["Magic"] = "🪄", + -- ["Path"] = "📁", + -- ["Dict key"] = "🔑", + -- ["Instance"] = "󱃻", + -- ["Statement"] = "󱇯", + -- }, + -- }), + -- }, + -- }) - -- -- menu item highlight - -- vim.api.nvim_set_hl(0, "CmpItemKindMagic", { bg = "NONE", fg = "#D4D434" }) - -- vim.api.nvim_set_hl(0, "CmpItemKindPath", { link = "CmpItemKindFolder" }) - -- vim.api.nvim_set_hl(0, "CmpItemKindDictkey", { link = "CmpItemKindKeyword" }) - -- vim.api.nvim_set_hl(0, "CmpItemKindInstance", { link = "CmpItemKindVariable" }) - -- vim.api.nvim_set_hl(0, "CmpItemKindStatement", { link = "CmpItemKindVariable" }) + -- -- menu item highlight + -- vim.api.nvim_set_hl(0, "CmpItemKindMagic", { bg = "NONE", fg = "#D4D434" }) + -- vim.api.nvim_set_hl(0, "CmpItemKindPath", { link = "CmpItemKindFolder" }) + -- vim.api.nvim_set_hl(0, "CmpItemKindDictkey", { link = "CmpItemKindKeyword" }) + -- vim.api.nvim_set_hl(0, "CmpItemKindInstance", { link = "CmpItemKindVariable" }) + -- vim.api.nvim_set_hl(0, "CmpItemKindStatement", { link = "CmpItemKindVariable" }) - -- vim.diagnostic.config({ - -- -- update_in_insert = true, -- Update diagnostics in Insert mode - -- -- ^ (if false, diagnostics are updated on InsertLeave) - -- - -- underline = true, - -- - -- virtual_text = true, - -- - -- severity_sort = true, -- high -> low - -- - -- -- float = { - -- -- focusable = false, - -- -- style = "minimal", - -- -- border = "rounded", - -- -- source = true, - -- -- header = { "  Diagnostics", "String" }, - -- -- prefix = function(_, _, _) - -- -- return "  ", "String" - -- -- end, - -- -- }, - -- }) + -- vim.diagnostic.config({ + -- -- update_in_insert = true, -- Update diagnostics in Insert mode + -- -- ^ (if false, diagnostics are updated on InsertLeave) + -- + -- underline = true, + -- + -- virtual_text = true, + -- + -- severity_sort = true, -- high -> low + -- + -- -- float = { + -- -- focusable = false, + -- -- style = "minimal", + -- -- border = "rounded", + -- -- source = true, + -- -- header = { "  Diagnostics", "String" }, + -- -- prefix = function(_, _, _) + -- -- return "  ", "String" + -- -- end, + -- -- }, + -- }) - -- treesitter jupyter notebook stuff - -- require("nvim-treesitter.configs").setup({ - -- textobjects = { - -- move = { - -- enable = true, - -- goto_next_start = { - -- ["]j"] = "@cellseparator", - -- ["]c"] = "@cellcontent", - -- }, - -- goto_previous_start = { - -- ["[j"] = "@cellseparator", - -- ["[c"] = "@cellcontent", - -- }, - -- }, - -- }, - -- }) - end, - }, + -- treesitter jupyter notebook stuff + -- require("nvim-treesitter.configs").setup({ + -- textobjects = { + -- move = { + -- enable = true, + -- goto_next_start = { + -- ["]j"] = "@cellseparator", + -- ["]c"] = "@cellcontent", + -- }, + -- goto_previous_start = { + -- ["[j"] = "@cellseparator", + -- ["[c"] = "@cellcontent", + -- }, + -- }, + -- }, + -- }) + end, + }, }