From 3a22bdcd751ea27414cd2c9a8c424e987e4cfe80 Mon Sep 17 00:00:00 2001 From: pegasust Date: Sun, 27 Nov 2022 19:04:38 -0700 Subject: [PATCH] I need autoindent for my own sanity --- home-nix/home.nix | 1 + neovim/init.lua | 9 ++++++++- system-nix/profiles/homeless/hardware-configuration.nix | 9 +++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/home-nix/home.nix b/home-nix/home.nix index 42d0b4c..ff5fd5d 100644 --- a/home-nix/home.nix +++ b/home-nix/home.nix @@ -52,6 +52,7 @@ programs.direnv = { enable = true; nix-direnv.enable = true; + # nix-direnv.enableFlakes = true; # must remove. this will always be supported. }; # z as smarter cd programs.zoxide = { diff --git a/neovim/init.lua b/neovim/init.lua index a79018a..b4fca4d 100644 --- a/neovim/init.lua +++ b/neovim/init.lua @@ -97,6 +97,8 @@ endif vim.cmd([[ set number relativenumber set tabstop=4 softtabstop=4 +set autoindent +set smartindent set expandtab set shiftwidth=4 set exrc @@ -334,7 +336,6 @@ require('nvim-treesitter.configs').setup { require('nvim-autopairs').setup { check_ts = true, - } local parser_config = require('nvim-treesitter.parsers').get_parser_configs() @@ -454,6 +455,12 @@ local source_mapping = { path = '[Path]', } +cmp.event:on( + "confirm_done", + require('nvim-autopairs.completion.cmp').on_confirm_done() +) + + cmp.setup { snippet = { expand = function(args) diff --git a/system-nix/profiles/homeless/hardware-configuration.nix b/system-nix/profiles/homeless/hardware-configuration.nix index aa59e37..e45b92a 100644 --- a/system-nix/profiles/homeless/hardware-configuration.nix +++ b/system-nix/profiles/homeless/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/profiles/qemu-guest.nix") + [ + (modulesPath + "/profiles/qemu-guest.nix") ]; boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ]; @@ -23,13 +24,13 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/sda"; + { + device = "/dev/sda"; fsType = "ext4"; }; swapDevices = - [ { device = "/dev/sdb"; } - ]; + [{ device = "/dev/sdb"; }]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's