Initial Commit
This commit is contained in:
+105
@@ -0,0 +1,105 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
#{
|
||||
# plugin = tokyonight-nvim;
|
||||
# config = ''
|
||||
# require("tokyonight").setup({
|
||||
# style = "night",
|
||||
# on_highlights = function(h1)
|
||||
# h1.LineNrAbove = {
|
||||
# fg = "#6ab8ff",
|
||||
# }
|
||||
# h1.LineNrBelow = {
|
||||
# fg = "#ff6188"
|
||||
# }
|
||||
# end,
|
||||
# on_colors = function() end,
|
||||
# })
|
||||
# vim.cmd.colorscheme("tokyonight")
|
||||
# '';
|
||||
#}
|
||||
{
|
||||
plugin = (nvim-treesitter.withPlugins (p: [
|
||||
p.c
|
||||
p.lua
|
||||
p.java
|
||||
p.vim
|
||||
p.vimdoc
|
||||
p.javascript
|
||||
p.query
|
||||
p.elixir
|
||||
p.html
|
||||
]));
|
||||
config = ''
|
||||
require("nvim-treesitter").setup({
|
||||
ensure_installed = {
|
||||
"c",
|
||||
"lua",
|
||||
"java",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"javascript",
|
||||
"query",
|
||||
"elixir",
|
||||
"html"
|
||||
},
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
'';
|
||||
}
|
||||
#{
|
||||
# plugin = bufferline-nvim;
|
||||
# config = ''
|
||||
# require("bufferline").setup({
|
||||
# options = {
|
||||
# mode = "tabs",
|
||||
# },
|
||||
# })
|
||||
# '';
|
||||
#}
|
||||
{
|
||||
plugin = vim-suda;
|
||||
config = ''
|
||||
vim.g["suda_smart_edit"] = 1
|
||||
'';
|
||||
}
|
||||
];
|
||||
initLua = ''
|
||||
-- use `:h <option>` to figure out meaning
|
||||
vim.opt.clipboard = "unnamedplus" -- use system keyboard
|
||||
vim.opt.completeopt = { "menu", "noinsert", "noselect" }
|
||||
vim.opt.mouse = "a" -- supposedly to allow the mouse to be used in nvim
|
||||
|
||||
-- Tab settings
|
||||
vim.opt.tabstop = 2 -- set number of visual spaces per \t (Tab)
|
||||
vim.opt.softtabstop = 2 -- set number of space in tab when editing
|
||||
vim.opt.shiftwidth = 2 -- insert 2 spaces on a tab
|
||||
vim.opt.expandtab = false -- for python apparently, treat tabs as spaces
|
||||
|
||||
-- UI config
|
||||
vim.opt.number = true -- show the absolute number
|
||||
vim.opt.relativenumber = true -- to add numbers to each line on the left side (line numbers?)
|
||||
vim.opt.cursorline = true -- highlights the line where the cursor is
|
||||
vim.opt.splitbelow = true -- sets new splits to be opened below
|
||||
vim.opt.splitright = true -- sets new splits to be opened to the right
|
||||
vim.opt.termguicolors = true -- enables 24-bit RGB color in Terminal UI
|
||||
-- vim.opt.showmode = false -- removes the --INSERT-- like UI at the bottom
|
||||
|
||||
-- Search settings
|
||||
vim.opt.incsearch = true -- search as characters are entered
|
||||
--vim.opt.hlsearch = false -- do not highlight matches
|
||||
vim.opt.ignorecase = true -- ignore cases by default
|
||||
vim.opt.smartcase = true -- when capitalized, be case sensitive
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user