1
Fork 0

feat: custom vim syntax for my project, printer drivers, etc

This commit is contained in:
Matei Adriel 2022-04-21 14:09:11 +03:00
parent de269054c2
commit b7d4d80c1b
11 changed files with 73 additions and 6 deletions

View file

@ -7,6 +7,13 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
hardware = {
pulseaudio = {
enable = true;
};
};
boot.loader = {
efi = {
canTouchEfiVariables = true;

View file

@ -1,7 +1,8 @@
(defcfg
;; For Linux
;; input (device-file "$DEVICE") ;; gets dynamically replaced by nix
input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
input (device-file "/dev/input/by-path/pci-0000:00:14.0-usb-0:5:1.0-event-kbd")
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
output (uinput-sink "My KMonad output"
;; To understand the importance of the following line, see the section on
;; Compose-key sequences at the near-bottom of this file.

View file

@ -34,6 +34,7 @@ function M.setup()
-- Import other options
require("my.options.folding").setup()
require("my.options.files").setup()
end
return M

View file

@ -0,0 +1,16 @@
local au = require("my.helpers.augroup")
local M = {}
local syntaxFiles = {bkf = "bkf"}
function M.setup()
au.augroup("myfiledetection", function()
for extension, syntax in pairs(syntaxFiles) do
au.autocmd("BufnewFile,BufRead", "*." .. extension,
"setf " .. syntax)
end
end)
end
return M

View file

@ -89,7 +89,13 @@ local servers = {
}
}
},
rnix = {}
rnix = {},
hls = {
haskell = {
-- set formatter
formattingProvider = "ormolu"
}
}
-- agda = {}, Haven't gotten this one to work yet
}

View file

@ -0,0 +1,28 @@
if exists("b:current_syntax")
finish
endif
echom "Our syntax highlighting code will go here."
syntax keyword kfKeyword alias template layer using
" syntax keyword kfFunction tap-macro
syntax match kfComment "\v--.*$"
syntax match kfOperator "\v_"
syntax match kfOperator "\v\:"
syntax match kfOperator "\v\|"
syntax match kfOperator "\v\="
syntax match kfOperator "\v\=\>"
syntax match kfOperator "\v\*"
syntax match kfOperator "\v\("
syntax match kfOperator "\v\)"
syntax region kfString start=/\v"/ skip=/\v\\./ end=/\v"/
highlight link kfKeyword Keyword
" highlight link kfFunction Function
highlight link kfComment Comment
highlight link kfOperator Operator
highlight link kfString String
let b:current_syntax = "kf"

View file

@ -41,9 +41,11 @@ in
idris2-pkgs.lsp # idris2
sumneko-lua-language-server # lua
rnix-lsp # nix
haskell-language-server # haskell
# Formatters
luaformatter # lua
ormolu # haskell
prettierd # prettier but faster
# Others

View file

@ -36,7 +36,7 @@
## module fails to load with
## module-bluez5-device.c: Failed to get device path from module arguments
## module.c: Failed to load module "module-bluez5-device" (argument: ""): initialization failed.
# load-module module-bluez5-device
load-module module-bluez5-device
# load-module module-bluez5-discover
'';

View file

@ -9,6 +9,7 @@
./xserver.nix
./users.nix
./nix.nix
./bluetooth.nix
./printers.nix
# ./bluetooth.nix
];
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
# let hie = pkgs.all-hies.selection { selector = p: { inherit (p) ghc865; }; };
{
home-manager.users.adrielus.home = {
file.".ghci".source = ./ghci;
@ -7,6 +6,6 @@
packages = with pkgs;
[ ghc ghcid hlint cabal-install stack ]
++ (with haskellPackages; [ brittany hoogle hpack ]);
++ (with haskellPackages; [ hoogle hpack ]);
};
}

6
modules/printers.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs, ... }: {
services.printing.enable = true;
services.printing.drivers = with pkgs; [
hplip
];
}