I need autoindent for my own sanity

nix-components
pegasust 2022-11-27 19:04:38 -07:00
parent 1372ad4f04
commit 3a22bdcd75
3 changed files with 14 additions and 5 deletions

View File

@ -52,6 +52,7 @@
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
# nix-direnv.enableFlakes = true; # must remove. this will always be supported.
}; };
# z <path> as smarter cd # z <path> as smarter cd
programs.zoxide = { programs.zoxide = {

View File

@ -97,6 +97,8 @@ endif
vim.cmd([[ vim.cmd([[
set number relativenumber set number relativenumber
set tabstop=4 softtabstop=4 set tabstop=4 softtabstop=4
set autoindent
set smartindent
set expandtab set expandtab
set shiftwidth=4 set shiftwidth=4
set exrc set exrc
@ -334,7 +336,6 @@ require('nvim-treesitter.configs').setup {
require('nvim-autopairs').setup { require('nvim-autopairs').setup {
check_ts = true, check_ts = true,
} }
local parser_config = require('nvim-treesitter.parsers').get_parser_configs() local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
@ -454,6 +455,12 @@ local source_mapping = {
path = '[Path]', path = '[Path]',
} }
cmp.event:on(
"confirm_done",
require('nvim-autopairs.completion.cmp').on_confirm_done()
)
cmp.setup { cmp.setup {
snippet = { snippet = {
expand = function(args) expand = function(args)

View File

@ -5,7 +5,8 @@
{ {
imports = imports =
[ (modulesPath + "/profiles/qemu-guest.nix") [
(modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ]; boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_scsi" "ahci" "sd_mod" ];
@ -23,13 +24,13 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/sda"; {
device = "/dev/sda";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices =
[ { device = "/dev/sdb"; } [{ device = "/dev/sdb"; }];
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's