Compare commits
7 Commits
cfc31cb69d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e0f079c53 | |||
| 63853fc7c5 | |||
| ce3c64b2b0 | |||
| 5cab6466dd | |||
| dc386a5f5c | |||
| 1ddcc8f068 | |||
| 210925720f |
@@ -1,4 +1,5 @@
|
||||
# NVIM For Voidfiles
|
||||
|
||||
Built using vim.pack and lots of mini plugins
|
||||
|
||||
## Installation
|
||||
@@ -7,7 +8,9 @@ This config uses nix-wrapper-modules to forego needing to install dotfiles at al
|
||||
more consistent experience across systems, in order to make it available to a dendritic nix environment.
|
||||
|
||||
### Trying
|
||||
|
||||
To try the config:
|
||||
|
||||
```bash
|
||||
nix run git+https://git.voidarc.co.uk/voidarc/nvim
|
||||
```
|
||||
@@ -15,6 +18,7 @@ nix run git+https://git.voidarc.co.uk/voidarc/nvim
|
||||
### Installing
|
||||
|
||||
Add the input to your flake:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
@@ -24,9 +28,11 @@ Add the input to your flake:
|
||||
```
|
||||
|
||||
And then add the package to your system config:
|
||||
|
||||
```nix
|
||||
inputs.nvim-voidarc.packages.${stdenv.hostPlatform.system}.default
|
||||
```
|
||||
|
||||
There is also a `minimal` output that doesn't install any lsps, only installing required pacakges so that the plugins
|
||||
function correctly (ripgrep, luarocks, luajit, etc)
|
||||
|
||||
|
||||
7
init.lua
7
init.lua
@@ -53,3 +53,10 @@ vim.keymap.set("n", "<leader>u", require("undotree").open)
|
||||
|
||||
-- Local project config
|
||||
vim.o.exrc = true
|
||||
|
||||
-- Ignore case and some flash nvim stuff
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
vim.api.nvim_set_hl(0, "FlashMatch", { fg = "#cba6f7", bold = true }) -- overlay0
|
||||
vim.api.nvim_set_hl(0, "FlashLabel", { fg = "#1e1e2e", bg = "#f38ba8", bold = false }) -- overlay0
|
||||
vim.api.nvim_set_hl(0, "FlashCurrent", { bg = "#cba6f7", fg = "#1e1e2e", bold = true }) -- overlay0
|
||||
|
||||
@@ -27,12 +27,12 @@ vim.api.nvim_create_autocmd("VimEnter", {
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "svelte" },
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
end,
|
||||
})
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- pattern = { "svelte" },
|
||||
-- callback = function()
|
||||
-- vim.treesitter.start()
|
||||
-- end,
|
||||
-- })
|
||||
|
||||
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
|
||||
|
||||
@@ -80,3 +80,11 @@ vim.api.nvim_create_autocmd("User", {
|
||||
print("AutoSave disabled")
|
||||
end,
|
||||
})
|
||||
|
||||
-- Center cursor on screen whenver insert mode is activated
|
||||
-- (Stops fucky wucky shit with scrollEOF)
|
||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||
callback = function()
|
||||
vim.cmd("normal! zz")
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -13,8 +13,7 @@ Keymap("n", "<leader>bd", function() -- delete buffer
|
||||
vim.cmd("echo 'Buffer deleted'")
|
||||
end)
|
||||
|
||||
for _, bind in ipairs({ "i", "a", "A" }) do
|
||||
-- Pass { expr = true } as the fourth argument
|
||||
for _, bind in ipairs({ "i", "a", "A", "I" }) do
|
||||
Keymap("n", bind, function()
|
||||
if vim.fn.getline("."):match("^%s*$") then
|
||||
return [["_cc]]
|
||||
@@ -44,7 +43,14 @@ Keymap("t", "<C-D>", "<C-\\><C-n>") -- escape terminal with c-d
|
||||
|
||||
-- Flash keymaps
|
||||
Keymap("n", "ss", function()
|
||||
require("flash").jump()
|
||||
require("flash").jump({
|
||||
search = {
|
||||
mode = "fuzzy",
|
||||
},
|
||||
highlight = {
|
||||
backdrop = true,
|
||||
},
|
||||
})
|
||||
end)
|
||||
Keymap("n", "S", function()
|
||||
require("flash").treesitter()
|
||||
|
||||
@@ -9,6 +9,7 @@ require("conform").setup({
|
||||
javascript = { "prettier" },
|
||||
typescriptreact = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
markdown = { "prettier" },
|
||||
html = { "prettier" },
|
||||
svelte = { "prettier" },
|
||||
python = { "black" },
|
||||
|
||||
@@ -22,5 +22,5 @@ require("catppuccin").setup({
|
||||
})
|
||||
require("vimade").setup({
|
||||
recipe = { "minimalist", { animate = true } },
|
||||
fadelevel = 0.6,
|
||||
fadelevel = 0.8,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user