summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2022-11-16 12:36:18 +0100
committerMike Vink <mike1994vink@gmail.com>2022-11-16 12:36:18 +0100
commit0bc56a03db2b198e0426ad38f71a0d70c66d44db (patch)
treebec7a4a93cd53816f6628818302d3e557be43b97
parente4feed89e6f15bcaaa6cefc8ca79d482accbb300 (diff)
racket and conjure stuff
-rw-r--r--flake.lock41
-rw-r--r--flake.nix13
-rw-r--r--home.nix5
-rw-r--r--neovim/init.lua4
-rw-r--r--neovim/lua/vimrc.lua11
-rw-r--r--neovim/lua/vimrc/lsp.lua2
6 files changed, 61 insertions, 15 deletions
diff --git a/flake.lock b/flake.lock
index ee5b257..35c231c 100644
--- a/flake.lock
+++ b/flake.lock
@@ -8,11 +8,11 @@
"utils": "utils"
},
"locked": {
- "lastModified": 1666903647,
- "narHash": "sha256-sFI1Gh9DTGzHnBINondupUGYbe+T0wZcpcZjkW0qffM=",
+ "lastModified": 1668332334,
+ "narHash": "sha256-YT1qcE/MCqBO1Bi/Yr6GcFpNKsvmzrBKh8juyXDbxQc=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "213a06295dff96668a1d673b9fd1c03ce1de6745",
+ "rev": "bc90de24d898655542589237cc0a6ada7564cb6c",
"type": "github"
},
"original": {
@@ -21,13 +21,29 @@
"type": "github"
}
},
+ "mvinkio": {
+ "locked": {
+ "lastModified": 1668543748,
+ "narHash": "sha256-S/PEXbIgJ+vCe1Nlq19CL6gmS92wMZvNRUJC/Q7tBJA=",
+ "owner": "mvinkio",
+ "repo": "nixpkgs",
+ "rev": "015ec7f85bb9a8278600d0a05eab9328f2c899ea",
+ "type": "github"
+ },
+ "original": {
+ "owner": "mvinkio",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixpkgs": {
"locked": {
- "lastModified": 1666959691,
- "narHash": "sha256-TRpWA3t8ata79HOGtFd5dDCl1kJQmIE16PDF53/Hcxo=",
+ "lastModified": 1668417584,
+ "narHash": "sha256-yeuEyxKPwsm5fIHN49L/syn9g5coxnPp3GsVquhrv5A=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "448a599c49978c2794401bfc3a2e1fba1a8663be",
+ "rev": "013fcdd106823416918004bb684c3c186d3c460f",
"type": "github"
},
"original": {
@@ -39,11 +55,11 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1666961615,
- "narHash": "sha256-+Sqz6zQA85Q14U/KwsJO386oxd47zDte8dqBGOtRJGg=",
+ "lastModified": 1668459637,
+ "narHash": "sha256-HqnWCKujmtu8v0CjzOT0sr7m2AR7+vpbZJOp1R0rodY=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "040c6d8374d090f46ab0e99f1f7c27a4529ecffd",
+ "rev": "16f4e04658c2ab10114545af2f39db17d51bd1bd",
"type": "github"
},
"original": {
@@ -56,17 +72,18 @@
"root": {
"inputs": {
"home-manager": "home-manager",
+ "mvinkio": "mvinkio",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
}
},
"utils": {
"locked": {
- "lastModified": 1659877975,
- "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
+ "lastModified": 1667395993,
+ "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
+ "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index b8b2af3..55f3a6e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,6 +4,7 @@
# Specify the source of Home Manager and Nixpkgs and vim plugins.
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ mvinkio.url = "github:mvinkio/nixpkgs/nixpkgs-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.05";
home-manager = {
url = "github:nix-community/home-manager";
@@ -14,17 +15,20 @@
outputs = {
self,
nixpkgs,
+ mvinkio,
nixpkgs-stable,
home-manager,
...
}: let
system = "x86_64-linux";
+ mvinkioPkgs = mvinkio.legacyPackages.${system};
overlay = nixpkgs.lib.composeManyExtensions [
(final: prev: {
+ tree-sitter = mvinkioPkgs.tree-sitter;
vimPlugins =
prev.vimPlugins
// {
- nvim-treesitter = prev.vimPlugins.nvim-treesitter.overrideAttrs (old: {
+ nvim-treesitter = mvinkioPkgs.vimPlugins.nvim-treesitter.overrideAttrs (old: {
version = "2022-10-28";
src = builtins.fetchGit {
url = "file:///home/mike/projects/nvim-treesitter";
@@ -33,7 +37,7 @@
passthru.withPlugins = grammarFn:
final.vimPlugins.nvim-treesitter.overrideAttrs (_: {
postPatch = let
- grammars = prev.tree-sitter.withPlugins grammarFn;
+ grammars = mvinkioPkgs.tree-sitter.withPlugins grammarFn;
in ''
rm -r parser
ln -s ${grammars} parser
@@ -69,6 +73,11 @@
git = "Furkanzmc/firvish.nvim";
rev = "127f9146175d6bbaff6a8b761081cfd2279f8351";
};
+ nvim-parinfer = getVimPlugin {
+ name = "nvim-parinfer";
+ git = "gpanders/nvim-parinfer";
+ rev = "82bce5798993f4fe5ced20e74003b492490b4fe8";
+ };
};
})
];
diff --git a/home.nix b/home.nix
index 05682db..e692bf0 100644
--- a/home.nix
+++ b/home.nix
@@ -129,6 +129,11 @@ LUA
cmp-buffer
cmp-path
cmp_luasnip
+
+ # trying out scheme
+ conjure
+ vim-racket
+ nvim-parinfer
];
};
}
diff --git a/neovim/init.lua b/neovim/init.lua
index b51f723..2ecb90a 100644
--- a/neovim/init.lua
+++ b/neovim/init.lua
@@ -95,8 +95,12 @@ vim.opt.diffopt:append("vertical")
vim.opt.shortmess:append("c")
-- }}}
+
-- load global and utility functions
+local racket_lang = vim.g.racket_hash_lang_dict
+racket_lang.sicp = "racket"
+vim.g.racket_hash_lang_dict = racket_lang
vim.api.nvim_set_keymap("n", "g<space>", ":TestNearest<cr>", {})
-- TODO: debug test
-- vim.api.nvim_set_keymap("n", "g<cr>", ":TestNearest<cr>", {})
diff --git a/neovim/lua/vimrc.lua b/neovim/lua/vimrc.lua
index 817ec92..3a90ad9 100644
--- a/neovim/lua/vimrc.lua
+++ b/neovim/lua/vimrc.lua
@@ -60,11 +60,20 @@ function M.setup_treesitter()
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
},
+ rainbow = {
+ enable = true,
+ -- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
+ extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
+ max_file_lines = nil, -- Do not enable for files with more than n lines, int
+ -- colors = {}, -- table of hex strings
+ -- termcolors = {} -- table of colour name strings
+ },
+
incremental_selection = {
enable = true,
},
indent = {
- enable = true,
+ enable = false,
disable = { "python", "yaml" },
},
}
diff --git a/neovim/lua/vimrc/lsp.lua b/neovim/lua/vimrc/lsp.lua
index b930bfa..bd3b206 100644
--- a/neovim/lua/vimrc/lsp.lua
+++ b/neovim/lua/vimrc/lsp.lua
@@ -205,6 +205,8 @@ function M.setup()
null_ls.builtins.formatting.alejandra,
-- python formatter: black
null_ls.builtins.formatting.black,
+ -- lisp formatter
+ null_ls.builtins.formatting.raco_fmt
}
})
end