Compare commits
7 Commits
cfc31cb69d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e0f079c53 | |||
| 63853fc7c5 | |||
| ce3c64b2b0 | |||
| 5cab6466dd | |||
| dc386a5f5c | |||
| 1ddcc8f068 | |||
| 210925720f |
@@ -1,4 +1,5 @@
|
|||||||
# NVIM For Voidfiles
|
# NVIM For Voidfiles
|
||||||
|
|
||||||
Built using vim.pack and lots of mini plugins
|
Built using vim.pack and lots of mini plugins
|
||||||
|
|
||||||
## Installation
|
## 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.
|
more consistent experience across systems, in order to make it available to a dendritic nix environment.
|
||||||
|
|
||||||
### Trying
|
### Trying
|
||||||
|
|
||||||
To try the config:
|
To try the config:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix run git+https://git.voidarc.co.uk/voidarc/nvim
|
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
|
### Installing
|
||||||
|
|
||||||
Add the input to your flake:
|
Add the input to your flake:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
@@ -24,9 +28,11 @@ Add the input to your flake:
|
|||||||
```
|
```
|
||||||
|
|
||||||
And then add the package to your system config:
|
And then add the package to your system config:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
inputs.nvim-voidarc.packages.${stdenv.hostPlatform.system}.default
|
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
|
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)
|
function correctly (ripgrep, luarocks, luajit, etc)
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@
|
|||||||
tree-sitter
|
tree-sitter
|
||||||
ripgrep
|
ripgrep
|
||||||
gcc
|
gcc
|
||||||
cargo
|
cargo
|
||||||
fzf
|
fzf
|
||||||
gnumake
|
gnumake
|
||||||
imagemagick
|
imagemagick
|
||||||
|
|||||||
7
init.lua
7
init.lua
@@ -53,3 +53,10 @@ vim.keymap.set("n", "<leader>u", require("undotree").open)
|
|||||||
|
|
||||||
-- Local project config
|
-- Local project config
|
||||||
vim.o.exrc = true
|
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,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
-- vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "svelte" },
|
-- pattern = { "svelte" },
|
||||||
callback = function()
|
-- callback = function()
|
||||||
vim.treesitter.start()
|
-- vim.treesitter.start()
|
||||||
end,
|
-- end,
|
||||||
})
|
-- })
|
||||||
|
|
||||||
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
|
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
|
||||||
|
|
||||||
@@ -80,3 +80,11 @@ vim.api.nvim_create_autocmd("User", {
|
|||||||
print("AutoSave disabled")
|
print("AutoSave disabled")
|
||||||
end,
|
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'")
|
vim.cmd("echo 'Buffer deleted'")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
for _, bind in ipairs({ "i", "a", "A" }) do
|
for _, bind in ipairs({ "i", "a", "A", "I" }) do
|
||||||
-- Pass { expr = true } as the fourth argument
|
|
||||||
Keymap("n", bind, function()
|
Keymap("n", bind, function()
|
||||||
if vim.fn.getline("."):match("^%s*$") then
|
if vim.fn.getline("."):match("^%s*$") then
|
||||||
return [["_cc]]
|
return [["_cc]]
|
||||||
@@ -44,7 +43,14 @@ Keymap("t", "<C-D>", "<C-\\><C-n>") -- escape terminal with c-d
|
|||||||
|
|
||||||
-- Flash keymaps
|
-- Flash keymaps
|
||||||
Keymap("n", "ss", function()
|
Keymap("n", "ss", function()
|
||||||
require("flash").jump()
|
require("flash").jump({
|
||||||
|
search = {
|
||||||
|
mode = "fuzzy",
|
||||||
|
},
|
||||||
|
highlight = {
|
||||||
|
backdrop = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
end)
|
end)
|
||||||
Keymap("n", "S", function()
|
Keymap("n", "S", function()
|
||||||
require("flash").treesitter()
|
require("flash").treesitter()
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ require("conform").setup({
|
|||||||
javascript = { "prettier" },
|
javascript = { "prettier" },
|
||||||
typescriptreact = { "prettier" },
|
typescriptreact = { "prettier" },
|
||||||
typescript = { "prettier" },
|
typescript = { "prettier" },
|
||||||
|
markdown = { "prettier" },
|
||||||
html = { "prettier" },
|
html = { "prettier" },
|
||||||
svelte = { "prettier" },
|
svelte = { "prettier" },
|
||||||
python = { "black" },
|
python = { "black" },
|
||||||
|
|||||||
@@ -22,5 +22,5 @@ require("catppuccin").setup({
|
|||||||
})
|
})
|
||||||
require("vimade").setup({
|
require("vimade").setup({
|
||||||
recipe = { "minimalist", { animate = true } },
|
recipe = { "minimalist", { animate = true } },
|
||||||
fadelevel = 0.6,
|
fadelevel = 0.8,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user