mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 00:45:17 -06:00
push today's rice
This commit is contained in:
parent
bfc15eb6cb
commit
916bb1bf5d
11 changed files with 64 additions and 46 deletions
3
config/init.lua
Executable file → Normal file
3
config/init.lua
Executable file → Normal file
|
|
@ -1,7 +1,6 @@
|
|||
require("blankline-conf")
|
||||
require("leap-conf")
|
||||
require("nvim-conf")
|
||||
require("nvim-treesitter-conf")
|
||||
require("plugins-conf")
|
||||
require("telescope-conf")
|
||||
require("toggleterm-conf")
|
||||
require("mini-conf")
|
||||
|
|
|
|||
8
config/lua/blankline-conf.lua
Executable file → Normal file
8
config/lua/blankline-conf.lua
Executable file → Normal file
|
|
@ -1,6 +1,6 @@
|
|||
vim.cmd([[ hi IndentBlanklineChar ctermfg=240 ]])
|
||||
vim.cmd([[ hi IndentBlanklineContextChar ctermfg=7 ]])
|
||||
require("indent_blankline").setup {
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
||||
-- require("indent_blankline").setup {
|
||||
-- show_current_context = true,
|
||||
-- show_current_context_start = true,
|
||||
-- }
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
local leap = require('leap')
|
||||
leap.set_default_keymaps()
|
||||
leap.init_highlight(true)
|
||||
vim.cmd([[ hi LeapLabelPrimary ctermbg=251 ctermfg=0 ]])
|
||||
|
||||
7
config/lua/main.go
Normal file
7
config/lua/main.go
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("vim-go")
|
||||
}
|
||||
22
config/lua/mini-conf.lua
Normal file
22
config/lua/mini-conf.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
require('mini.comment').setup()
|
||||
require('mini.move').setup()
|
||||
require('mini.surround').setup()
|
||||
require('mini.splitjoin').setup({
|
||||
detect = {
|
||||
separator = '[,;\n]'
|
||||
}
|
||||
})
|
||||
|
||||
require('mini.pairs').setup()
|
||||
vim.cmd([[ hi MiniCursorwordCurrent ctermfg=240 ]])
|
||||
|
||||
require('mini.jump2d').setup({
|
||||
mappings = { start_jumping = '<leader>s' }
|
||||
})
|
||||
|
||||
indent = require('mini.indentscope')
|
||||
indent.setup({
|
||||
options = { try_as_border = false },
|
||||
draw = { delay = 0 }
|
||||
})
|
||||
indent.gen_animation.none()
|
||||
13
config/lua/nvim-conf.lua
Executable file → Normal file
13
config/lua/nvim-conf.lua
Executable file → Normal file
|
|
@ -3,7 +3,7 @@
|
|||
vim.opt.autoindent = true
|
||||
vim.opt.background = "light"
|
||||
vim.opt.backspace = "indent,eol,start"
|
||||
vim.opt.backup = false -- and auto backps, to instead use
|
||||
vim.opt.backup = false
|
||||
vim.opt.breakindent = true
|
||||
vim.opt.clipboard = "unnamedplus" -- use system clipboard
|
||||
vim.opt.completeopt = "menuone"
|
||||
|
|
@ -13,11 +13,12 @@ vim.opt.guicursor = "" -- fixes alacritty changing cursor
|
|||
vim.opt.hidden = true -- dont save when switching buffers
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.ignorecase = true -- ignore case in searches
|
||||
vim.opt.inccommand = "split" -- incremental live completion
|
||||
vim.opt.inccommand = "split" -- incremental live completion
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.laststatus = 1
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars:append("trail:·")
|
||||
vim.opt.listchars:append("leadmultispace:╎ ")
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.nrformats:append("alpha") -- let Ctrl-a do letters as well
|
||||
vim.opt.number = true
|
||||
|
|
@ -30,10 +31,10 @@ vim.opt.showmatch = true -- highlight matching brackets
|
|||
vim.opt.signcolumn= "number"
|
||||
vim.opt.smartcase = true -- unless capital query
|
||||
vim.opt.smartindent = true -- indent according to lang
|
||||
vim.opt.softtabstop = -1 -- backspace removes tabstop
|
||||
vim.opt.softtabstop = -1 -- backspace removes tabstop
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.swapfile = false -- disable swapfiles
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.tabstop = 4 -- 4 space tabs
|
||||
vim.opt.undofile = true -- enable auto save of undos
|
||||
vim.opt.updatetime = 250 -- decrease update time
|
||||
|
|
@ -46,9 +47,11 @@ vim.g.netrw_liststyle = 3 -- tree view
|
|||
vim.g.fzf_layout = { window = { width = 0.9, height = 0.6 } }
|
||||
vim.g.indent_blankline_use_treesitter = true
|
||||
|
||||
-- highlight indents
|
||||
vim.cmd([[ hi Whitespace ctermfg=240 ]])
|
||||
-- mappings
|
||||
----------------------------------------
|
||||
-- local func to set keybinds
|
||||
|
||||
local remap = function(type, key, value)
|
||||
vim.api.nvim_set_keymap(type,key,value,{noremap = true, silent = true});
|
||||
end
|
||||
|
|
|
|||
0
config/lua/nvim-treesitter-conf.lua
Executable file → Normal file
0
config/lua/nvim-treesitter-conf.lua
Executable file → Normal file
|
|
@ -1,2 +0,0 @@
|
|||
-- telescope
|
||||
----------------------------------------
|
||||
7
config/lua/telescope-conf.lua
Executable file → Normal file
7
config/lua/telescope-conf.lua
Executable file → Normal file
|
|
@ -6,6 +6,8 @@ vim.keymap.set("n", "<leader>fv", telescope.command_history, {noremap = true, si
|
|||
vim.keymap.set("n", "<leader><leader>", telescope.live_grep, {noremap = true, silent = true})
|
||||
vim.keymap.set("n", "<leader>8", telescope.grep_string, {noremap = true, silent = true})
|
||||
vim.keymap.set("n", "<leader>fd", telescope.lsp_definitions, {noremap = true, silent = true})
|
||||
vim.keymap.set("n", "<leader><BS>", telescope.resume, {noremap = true, silent = true})
|
||||
vim.keymap.set("n", "<leader>fr", telescope.lsp_references, {noremap = true, silent = true})
|
||||
-- fix highlighting
|
||||
vim.cmd([[ hi telescopeselection ctermfg=242 ctermbg=252 ]])
|
||||
|
||||
|
|
@ -13,6 +15,9 @@ require("telescope").setup({
|
|||
defaults = {
|
||||
layout_strategy = "vertical",
|
||||
layout_config = { width = .90, },
|
||||
prompt_title = false,
|
||||
results_title = false,
|
||||
preview_title = false,
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--color=never",
|
||||
|
|
@ -25,7 +30,7 @@ require("telescope").setup({
|
|||
},
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = require("telescope.actions").close,
|
||||
["wq"] = require("telescope.actions").close,
|
||||
["<C-k>"] = require("telescope.actions").move_selection_previous,
|
||||
["<C-j>"] = require("telescope.actions").move_selection_next,
|
||||
},
|
||||
|
|
|
|||
0
config/lua/toggleterm-conf.lua
Executable file → Normal file
0
config/lua/toggleterm-conf.lua
Executable file → Normal file
43
flake.nix
43
flake.nix
|
|
@ -4,17 +4,18 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
outputs = inputs @ {self, nixpkgs, flake-utils, ...}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
dependancies = with pkgs; [
|
||||
bash fd fzf gopls ripgrep
|
||||
];
|
||||
neovim-with-deps = recursiveMerge [
|
||||
pkgs.neovim-unwrapped
|
||||
{buildInputs = dependancies;}
|
||||
];
|
||||
recursiveMerge = attrList: let
|
||||
f = attrPath:
|
||||
builtins.zipAttrsWith (n: values:
|
||||
|
|
@ -28,20 +29,12 @@
|
|||
in
|
||||
f [] attrList;
|
||||
in rec {
|
||||
deps = with pkgs; [
|
||||
bash
|
||||
fzf
|
||||
ripgrep
|
||||
gopls
|
||||
];
|
||||
neovim-with-deps = recursiveMerge [
|
||||
pkgs.neovim-unwrapped
|
||||
{buildInputs = deps;}
|
||||
];
|
||||
packages.iofqvim = pkgs.wrapNeovim neovim-with-deps {
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
extraMakeWrapperArgs = ''--prefix PATH : "${pkgs.lib.makeBinPath deps}"'';
|
||||
withRuby = false;
|
||||
withPython3 = false;
|
||||
extraMakeWrapperArgs = ''--prefix PATH : "${pkgs.lib.makeBinPath dependancies}"'';
|
||||
configure = {
|
||||
customRC =
|
||||
''
|
||||
|
|
@ -55,15 +48,10 @@
|
|||
packages.plugins = with pkgs.vimPlugins; {
|
||||
start = with pkgs.vimPlugins; [
|
||||
telescope-nvim
|
||||
vim-commentary
|
||||
vim-surround
|
||||
toggleterm-nvim
|
||||
targets-vim
|
||||
indent-blankline-nvim
|
||||
mini-nvim
|
||||
vim-go
|
||||
vim-nix
|
||||
nvim-treesitter-textobjects
|
||||
leap-nvim
|
||||
(nvim-treesitter.withPlugins
|
||||
(
|
||||
plugins: with plugins; [
|
||||
|
|
@ -74,6 +62,7 @@
|
|||
tree-sitter-javascript
|
||||
tree-sitter-json
|
||||
tree-sitter-lua
|
||||
tree-sitter-markdown
|
||||
tree-sitter-nix
|
||||
tree-sitter-php
|
||||
tree-sitter-python
|
||||
|
|
@ -81,14 +70,14 @@
|
|||
]
|
||||
)
|
||||
)
|
||||
nvim-treesitter-textobjects
|
||||
leap-nvim
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
apps.iofqvim = flake-utils.lib.mkApp {
|
||||
drv = packages.iofqvim;
|
||||
name = "iofqvim";
|
||||
exePath = "/bin/nvim";
|
||||
drv = packages.iofqvim; name = "iofqvim"; exePath = "/bin/nvim";
|
||||
};
|
||||
apps.default = apps.iofqvim;
|
||||
packages.default = packages.iofqvim;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue