mirror of
https://github.com/kennethnym/freya
synced 2026-07-01 13:51:14 +01:00
dev: add nvim config (#153)
This commit is contained in:
19
.nvim.lua
Normal file
19
.nvim.lua
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
local ok, conform = pcall(require, "conform")
|
||||||
|
if not ok then
|
||||||
|
vim.notify("conform.nvim not loaded", vim.log.levels.WARN)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
conform.setup({
|
||||||
|
formatters_by_ft = {
|
||||||
|
javascript = { "oxfmt" },
|
||||||
|
javascriptreact = { "oxfmt" },
|
||||||
|
typescript = { "oxfmt" },
|
||||||
|
typescriptreact = { "oxfmt" },
|
||||||
|
json = { "oxfmt" },
|
||||||
|
jsonc = { "oxfmt" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.enable("tsgo")
|
||||||
|
vim.lsp.enable("oxlint")
|
||||||
10
flake.nix
10
flake.nix
@@ -53,7 +53,8 @@
|
|||||||
# so source-only edits do not force Bun to reinstall.
|
# so source-only edits do not force Bun to reinstall.
|
||||||
dependencySource = lib.fileset.toSource {
|
dependencySource = lib.fileset.toSource {
|
||||||
root = ./.;
|
root = ./.;
|
||||||
fileset = lib.fileset.fileFilter (
|
fileset = lib.fileset.fileFilter
|
||||||
|
(
|
||||||
file: file.name == "bun.lock" || file.name == "package.json" || file.name == "bunfig.toml"
|
file: file.name == "bun.lock" || file.name == "package.json" || file.name == "bunfig.toml"
|
||||||
) ./.;
|
) ./.;
|
||||||
};
|
};
|
||||||
@@ -92,10 +93,12 @@
|
|||||||
lib.mapAttrs mkBunScript scripts;
|
lib.mapAttrs mkBunScript scripts;
|
||||||
mkBunApps =
|
mkBunApps =
|
||||||
commands:
|
commands:
|
||||||
lib.mapAttrs (name: command: {
|
lib.mapAttrs
|
||||||
|
(name: command: {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${command}/bin/${name}";
|
program = "${command}/bin/${name}";
|
||||||
}) commands;
|
})
|
||||||
|
commands;
|
||||||
mkBunNodeModules =
|
mkBunNodeModules =
|
||||||
system: pkgs:
|
system: pkgs:
|
||||||
pkgs.stdenvNoCC.mkDerivation {
|
pkgs.stdenvNoCC.mkDerivation {
|
||||||
@@ -255,6 +258,7 @@
|
|||||||
pkg-config
|
pkg-config
|
||||||
postgresql
|
postgresql
|
||||||
python3
|
python3
|
||||||
|
typescript-go
|
||||||
watchman
|
watchman
|
||||||
];
|
];
|
||||||
linuxPackages = with pkgs; [
|
linuxPackages = with pkgs; [
|
||||||
|
|||||||
Reference in New Issue
Block a user