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.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
hardware = {
pulseaudio = {
enable = true;
};
};
boot.loader = { boot.loader = {
efi = { efi = {
canTouchEfiVariables = true; canTouchEfiVariables = true;

View file

@ -1,7 +1,8 @@
(defcfg (defcfg
;; For Linux ;; For Linux
;; input (device-file "$DEVICE") ;; gets dynamically replaced by nix ;; 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" output (uinput-sink "My KMonad output"
;; To understand the importance of the following line, see the section on ;; To understand the importance of the following line, see the section on
;; Compose-key sequences at the near-bottom of this file. ;; Compose-key sequences at the near-bottom of this file.

View file

@ -34,6 +34,7 @@ function M.setup()
-- Import other options -- Import other options
require("my.options.folding").setup() require("my.options.folding").setup()
require("my.options.files").setup()
end end
return M 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 -- 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 idris2-pkgs.lsp # idris2
sumneko-lua-language-server # lua sumneko-lua-language-server # lua
rnix-lsp # nix rnix-lsp # nix
haskell-language-server # haskell
# Formatters # Formatters
luaformatter # lua luaformatter # lua
ormolu # haskell
prettierd # prettier but faster prettierd # prettier but faster
# Others # Others

View file

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

View file

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

View file

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