wyebanie neovima

This commit is contained in:
installer
2024-11-18 17:12:16 +01:00
parent 27a0972719
commit fe70fe3f8a
20 changed files with 4 additions and 406 deletions

View File

@@ -27,13 +27,11 @@ This release has a big theming change as well as including the move back to rofi
- Switch from Nix Colors to Stylix. It can build colorschemes from a wallpaper.
- Simplified the notification center.
- Improved emoji selection menu and options.
- Adding fine-cmdline plugin for Neovim.
- Removed theme changing scripts as the theme is generated by the image set with stylix.image in the config.nix file.
- Starship is now setup in the config.nix file.
- Switched from SDDM to tuigreet and greetd.
- Added Plymouth for better looking booting.
- Improve the fonts being installed and properly separate them from regular packages.
- Separated Neovim configuration for readability.
- Updated flake and added fix for popups going to wrkspc 1 in Hyprland.
- Removed a few of the packages that aren't necessary and smartd by default.
- Removed unnecessary Hyprland input in flake as home manager doesn't use it.

View File

@@ -22,10 +22,8 @@ ZaneyOS is a simple way of reproducing my configuration on any NixOS system. Thi
#### 🎹 Pipewire, Spotify, & Notification Menu Controls
- We are using the latest and greatest audio solution for Linux. If you like listening to music Spotify comes pre-installed out of the box. Not to mention you will have media and volume controls in the notification center available in the top bar.
#### 🏇 Optimized Workflow, tmpfs For Speed, & Simple Yet Elegant Neovim
- Using scratchpads with Hyprland for increased functionality and effeciency.
- A tmpfs for the /tmp directory is created improving rebuild time and reducing strain on hdd/ssd.
- No massive Neovim project here. This is my simple, easy to understand, yet incredible Neovim setup. You can grep recursively through entire folders and find specific files without ever leaving the text editor!
#### 🖥️ Multi Host & User Configuration
- You can now define separate settings for different host machines and users!
@@ -65,12 +63,6 @@ sh <(curl -L https://gitlab.com/Zaney/zaneyos/-/raw/main/install-zaneyos.sh)
#### 🦽 Manual:
Run this command to ensure Git & Vim are installed:
```
nix-shell -p git vim
```
Clone this repo & enter it:
```

View File

@@ -1,90 +0,0 @@
{
pkgs,
inputs,
...
}: let
finecmdline = pkgs.vimUtils.buildVimPlugin {
name = "fine-cmdline";
src = inputs.fine-cmdline;
};
in {
programs = {
neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
extraPackages = with pkgs; [
lua-language-server
gopls
xclip
wl-clipboard
luajitPackages.lua-lsp
nil
rust-analyzer
#nodePackages.bash-language-server
yaml-language-server
pyright
marksman
];
plugins = with pkgs.vimPlugins; [
alpha-nvim
auto-session
bufferline-nvim
dressing-nvim
indent-blankline-nvim
nui-nvim
finecmdline
nvim-treesitter.withAllGrammars
lualine-nvim
nvim-autopairs
nvim-web-devicons
nvim-cmp
nvim-surround
nvim-lspconfig
cmp-nvim-lsp
cmp-buffer
luasnip
cmp_luasnip
friendly-snippets
lspkind-nvim
comment-nvim
nvim-ts-context-commentstring
plenary-nvim
neodev-nvim
luasnip
telescope-nvim
todo-comments-nvim
nvim-tree-lua
telescope-fzf-native-nvim
vim-tmux-navigator
];
extraConfig = ''
set noemoji
nnoremap : <cmd>FineCmdline<CR>
'';
extraLuaConfig = ''
${builtins.readFile ./nvim/options.lua}
${builtins.readFile ./nvim/keymaps.lua}
${builtins.readFile ./nvim/plugins/alpha.lua}
${builtins.readFile ./nvim/plugins/autopairs.lua}
${builtins.readFile ./nvim/plugins/auto-session.lua}
${builtins.readFile ./nvim/plugins/comment.lua}
${builtins.readFile ./nvim/plugins/cmp.lua}
${builtins.readFile ./nvim/plugins/lsp.lua}
${builtins.readFile ./nvim/plugins/nvim-tree.lua}
${builtins.readFile ./nvim/plugins/telescope.lua}
${builtins.readFile ./nvim/plugins/todo-comments.lua}
${builtins.readFile ./nvim/plugins/treesitter.lua}
${builtins.readFile ./nvim/plugins/fine-cmdline.lua}
require("ibl").setup()
require("bufferline").setup{}
require("lualine").setup({
icons_enabled = true,
})
'';
};
};
}

View File

@@ -1,15 +0,0 @@
local keymap = vim.keymap
-- use jk to exit insert mode
keymap.set("i", "jk", "<ESC>", { desc = "Exit insert mode with jk" })
-- clear search highlights
keymap.set("n", "<leader>nh", ":nohl<CR>", { desc = "Clear search highlights" })
-- window management
keymap.set("n", "<leader>sv", "<C-w>v", { desc = "Split window vertically" }) -- split window vertically
keymap.set("n", "<leader>sh", "<C-w>s", { desc = "Split window horizontally" }) -- split window horizontally
keymap.set("n", "<leader>se", "<C-w>=", { desc = "Make splits equal size" }) -- make split windows equal width & height
keymap.set("n", "<leader>sx", "<cmd>close<CR>", { desc = "Close current split" }) -- close current split window
keymap.set("n", "<leader>to", "<cmd>tabnew<CR>", { desc = "Open new tab" }) -- open new tab
keymap.set("n", "<leader>tx", "<cmd>tabclose<CR>", { desc = "Close current tab" }) -- close current tab
keymap.set("n", "<leader>tn", "<cmd>tabn<CR>", { desc = "Go to next tab" }) -- go to next tab
keymap.set("n", "<leader>tp", "<cmd>tabp<CR>", { desc = "Go to previous tab" }) -- go to previous tab
keymap.set("n", "<leader>tf", "<cmd>tabnew %<CR>", { desc = "Open current buffer in new tab" }) -- move current buffer to new tab

View File

@@ -1,21 +0,0 @@
local opt = vim.opt
opt.number = true
opt.relativenumber = true
opt.tabstop = 2
opt.shiftwidth = 2
opt.expandtab = true
opt.autoindent = true
opt.wrap = false
opt.ignorecase = true
opt.smartcase = true
opt.termguicolors = true
opt.background = "dark"
opt.signcolumn = "yes"
opt.mouse = "a"
opt.cursorline = true
opt.backspace = "indent,eol,start"
opt.clipboard:append("unnamedplus")
opt.splitright = true
opt.splitbelow = true
opt.swapfile = false
vim.g.mapleader = " "

View File

@@ -1,30 +0,0 @@
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")
-- Set header
dashboard.section.header.val = {
" ",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ",
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ",
" ",
}
-- Set menu
dashboard.section.buttons.val = {
dashboard.button("e", " > New File", "<cmd>ene<CR>"),
dashboard.button("SPC fe", " > Toggle file explorer", "<cmd>NvimTreeToggle<CR>"),
dashboard.button("SPC ff", "󰱼 > Find File", "<cmd>Telescope find_files<CR>"),
dashboard.button("SPC lg", " > Find Word", "<cmd>Telescope live_grep<CR>"),
dashboard.button("SPC wr", "󰁯 > Restore Session For Current Directory", "<cmd>SessionRestore<CR>"),
dashboard.button("q", " > Quit NVIM", "<cmd>qa<CR>"),
}
-- Send config to alpha
alpha.setup(dashboard.opts)
-- Disable folding on alpha buffer
vim.cmd([[autocmd FileType alpha setlocal nofoldenable]])

View File

@@ -1,11 +0,0 @@
local auto_session = require("auto-session")
auto_session.setup({
auto_restore_enabled = false,
auto_session_suppress_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" },
})
local keymap = vim.keymap
keymap.set("n", "<leader>wr", "<cmd>SessionRestore<CR>", { desc = "Restore session for cwd" }) -- restore last workspace session for current directory
keymap.set("n", "<leader>ws", "<cmd>SessionSave<CR>", { desc = "Save session for auto session root dir" }) -- save workspace session for current working directory

View File

@@ -1,20 +0,0 @@
local autopairs = require("nvim-autopairs")
-- configure autopairs
autopairs.setup({
check_ts = true, -- enable treesitter
ts_config = {
lua = { "string" }, -- don't add pairs in lua string treesitter nodes
javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes
java = false, -- don't check treesitter on java
},
})
-- import nvim-autopairs completion functionality
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
-- import nvim-cmp plugin (completions plugin)
local cmp = require("cmp")
-- make autopairs and completion work together
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())

View File

@@ -1,41 +0,0 @@
local cmp = require("cmp")
local luasnip = require("luasnip")
local lspkind = require("lspkind")
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({
completion = {
completeopt = "menu,menuone,preview,noselect",
},
snippet = { -- configure how nvim-cmp interacts with snippet engine
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion
["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<C-e>"] = cmp.mapping.abort(), -- close completion window
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
-- sources for autocompletion
sources = cmp.config.sources({
{ name = "nvim_lsp" }, -- language servers
{ name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
}),
-- configure lspkind for vs-code like pictograms in completion menu
formatting = {
format = lspkind.cmp_format({
maxwidth = 50,
ellipsis_char = "...",
}),
},
})

View File

@@ -1,9 +0,0 @@
local comment = require("Comment")
local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim")
-- enable comment
comment.setup({
-- for commenting tsx, jsx, svelte, html files
pre_hook = ts_context_commentstring.create_pre_hook(),
})

View File

@@ -1,33 +0,0 @@
require('fine-cmdline').setup({
cmdline = {
enable_keymaps = true,
smart_history = true,
prompt = '> '
},
popup = {
position = {
row = '10%',
col = '50%',
},
size = {
width = '60%',
},
border = {
style = 'rounded',
},
win_options = {
winhighlight = 'Normal:Normal,FloatBorder:FloatBorder',
},
},
hooks = {
before_mount = function(input)
-- code
end,
after_mount = function(input)
-- code
end,
set_keymaps = function(imap, feedkeys)
-- code
end
}
})

View File

@@ -1,8 +0,0 @@
local lspconfig = require("lspconfig")
require'lspconfig'.pyright.setup{}
require'lspconfig'.nil_ls.setup{}
require'lspconfig'.marksman.setup{}
require'lspconfig'.rust_analyzer.setup{}
require'lspconfig'.yamlls.setup{}
require'lspconfig'.bashls.setup{}

View File

@@ -1,47 +0,0 @@
local nvimtree = require("nvim-tree")
-- recommended settings from nvim-tree documentation
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
nvimtree.setup({
view = {
width = 35,
relativenumber = true,
},
-- change folder arrow icons
renderer = {
indent_markers = {
enable = true,
},
icons = {
glyphs = {
folder = {
arrow_closed = "", -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open
},
},
},
},
-- disable window_picker for
-- explorer to work well with
-- window splits
actions = {
open_file = {
window_picker = {
enable = false,
},
},
},
filters = {
custom = { ".DS_Store" },
},
git = {
ignore = false,
},
})
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "<leader>fe", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer

View File

@@ -1,20 +0,0 @@
require('telescope').setup({
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
}
}
})
require('telescope').load_extension('fzf')
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>lg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" })

View File

@@ -1,14 +0,0 @@
local todo_comments = require("todo-comments")
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "]t", function()
todo_comments.jump_next()
end, { desc = "Next todo comment" })
keymap.set("n", "[t", function()
todo_comments.jump_prev()
end, { desc = "Previous todo comment" })
todo_comments.setup()

View File

@@ -1,9 +0,0 @@
require('nvim-treesitter.configs').setup {
ensure_installed = {},
auto_install = false,
highlight = { enable = true },
indent = { enable = true },
}

17
flake.lock generated
View File

@@ -66,22 +66,6 @@
"type": "github"
}
},
"fine-cmdline": {
"flake": false,
"locked": {
"lastModified": 1721082103,
"narHash": "sha256-SMmOzDhkRBBPCuXXZFUxog6YWRQ2tdlJuJGjYlyNTgk=",
"owner": "VonHeikemen",
"repo": "fine-cmdline.nvim",
"rev": "aec9efebf6f4606a5204d49ffa3ce2eeb7e08a3e",
"type": "github"
},
"original": {
"owner": "VonHeikemen",
"repo": "fine-cmdline.nvim",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@@ -191,7 +175,6 @@
},
"root": {
"inputs": {
"fine-cmdline": "fine-cmdline",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"stylix": "stylix"

View File

@@ -14,10 +14,6 @@
home-manager.follows = "home-manager";
};
};
fine-cmdline = {
url = "github:VonHeikemen/fine-cmdline.nvim";
flake = false;
};
};
outputs = {

View File

@@ -245,7 +245,6 @@ in {
};
environment.systemPackages = with pkgs; [
vim
wget
killall
eza
@@ -298,7 +297,6 @@ in {
pavucontrol
tree
spotify
neovide
greetd.tuigreet
librewolf
protonup
@@ -320,6 +318,7 @@ in {
nodejs
kdePackages.kdenlive
obs-studio
thefuck
];
fonts = {

View File

@@ -16,7 +16,6 @@ in {
../../config/emoji.nix
../../config/fastfetch
../../config/hyprland.nix
../../config/neovim.nix
../../config/rofi/rofi.nix
../../config/rofi/config-emoji.nix
../../config/rofi/config-long.nix
@@ -148,9 +147,6 @@ in {
gh.enable = true;
btop = {
enable = true;
settings = {
vim_keys = true;
};
};
kitty = {
enable = true;
@@ -195,13 +191,15 @@ in {
fu = "nh os switch --hostname ${host} --update /home/${username}/zaneyos";
zu = "sh <(curl -L https://gitlab.com/Zaney/zaneyos/-/raw/main/install-zaneyos.sh)";
ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
v = "nvim";
n = "nano";
f = "fuck";
cat = "bat";
ls = "eza --icons";
ll = "eza -lh --icons --grid --group-directories-first";
la = "eza -lah --icons --grid --group-directories-first";
ssh-server = "ssh garand_plg@192.168.1.156 -p 556 -i ~/.ssh/hp-t640-homeserver";
terminal = "cat /home/garand_plg/Documents/terminal.txt";
e-terminal = "nano /home/garand_plg/Documents/terminal.txt";
".." = "cd ..";
};
};