diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..777fc95 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,12 @@ +globals = { + "vim", + "vis", + "setup", +} + +files["vis/visrc.lua"] = { + ignore = { + "211/_plugins", + "_setup_plug", + }, +} diff --git a/boot.nix b/boot.nix index cd4f93c..a100fd3 100644 --- a/boot.nix +++ b/boot.nix @@ -1,4 +1,5 @@ -{ ... }: { +{ ... }: +{ # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/host-specific/edge/hardware-configuration.nix b/host-specific/edge/hardware-configuration.nix index ab444d6..c599367 100644 --- a/host-specific/edge/hardware-configuration.nix +++ b/host-specific/edge/hardware-configuration.nix @@ -1,28 +1,42 @@ # 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" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/8101a0a8-a8c6-4083-85b6-c136d3c80f2e"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/8101a0a8-a8c6-4083-85b6-c136d3c80f2e"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/E7AD-32DA"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/E7AD-32DA"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; swapDevices = [ ]; diff --git a/nvim/init.lua b/nvim/init.lua index 3f1faa3..09f14b5 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -87,7 +87,13 @@ local keymap = vim.keymap.set local noremap = { noremap = true } local silentnoremap = { noremap = true, silent = true } --Toggle background -keymap("n", "bg", function() if vim.o.background == "light" then vim.o.background = "dark" else vim.o.background = "light" end end, noremap) +keymap("n", "bg", function() + if vim.o.background == "light" then + vim.o.background = "dark" + else + vim.o.background = "light" + end +end, noremap) -- Easier breaking from edit modes keymap("n", ";;", "", noremap) keymap("v", ";;", "", noremap) diff --git a/nvim/lua/completion.lua b/nvim/lua/completion.lua index c21a2be..2551d4a 100644 --- a/nvim/lua/completion.lua +++ b/nvim/lua/completion.lua @@ -17,7 +17,8 @@ return function() [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete(), [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }) -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + -- Accept the selected item, or the first item if none is selected. + [''] = cmp.mapping.confirm({ select = true }) }), sources = cmp.config.sources({ { name = 'lazydev', group_index = 0 }, diff --git a/shell.nix b/shell.nix index de3a578..54dcf16 100644 --- a/shell.nix +++ b/shell.nix @@ -1,2 +1,9 @@ -{ pkgs ? import { } }: -pkgs.mkShell { packages = with pkgs; [ nil lua-language-server ]; } +{ + pkgs ? import { }, +}: +pkgs.mkShell { + packages = with pkgs; [ + nil + lua-language-server + ]; +} diff --git a/vis/visrc.lua b/vis/visrc.lua index c5ff9cb..5154713 100644 --- a/vis/visrc.lua +++ b/vis/visrc.lua @@ -1,15 +1,15 @@ require('vis') -local plugins = { +local _plugins = { --{ 'timoha/vis-acme', theme = true, file = 'acme' }, { 'milhnl/vis-format' }, { url = 'https://git.cepl.eu/cgit/vis/vis-fzf-open' }, - -- Disable LSP, they're slow to initialize + -- Disable LSP, they're slow to initialize -- and we don't have good non-blocking support --{ url = 'https://gitlab.com/muhq/vis-lspc.git' }, { url = 'https://repo.or.cz/vis-parkour.git', alias = 'vis-parkour' } } -local function setup_plug() +local function _setup_plug() if not pcall(require, 'plugins/vis-plug') then os.execute('git clone --quiet https://github.com/erf/vis-plug ' .. (os.getenv('XDG_CONFIG_HOME') or os.getenv('HOME') .. '/.config')