added nice neovim configuratons

This commit is contained in:
ISnortPennies 2022-08-12 18:21:08 -04:00
parent 92a800c118
commit 5513491697
4 changed files with 65 additions and 24 deletions

52
home-manager/init.lua Normal file
View file

@ -0,0 +1,52 @@
local g = vim.g
local o = vim.o
-- settings
-- keybind modifier
g.mapleader = "'"
o.updatetime = 300
o.incsearch = true
-- backups bad
o.swapfile = false
o.backup = false
o.writebackup = false
--formatting
o.expandtab = true
o.shiftwidth = true
o.tabstop = 2
-- pretty numbers
o.signcolumn = "number"
o.number = true
--easy keybinds
local function map(mode, lhs, rhs, opts)
local options = { noremap = true }
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
end
-- show tree
map("n", "<Leader>t", ":NvimTreeToggle<CR>")
-- coc completion
map("i", "<cr>", 'pumvisible() ? coc#_select_confirm() : \"\\<C-g>u\\<CR>\"', {silent = true, expr = true})
-- plugin setups
require("nvim-tree").setup {
open_on_setup = true,
sort_by = "case_sensitive",
actions = {
open_file = {
quit_on_open = true,
},
},
}
require("nvim-web-devicons").setup()
require("nvim-treesitter.configs").setup {
ensure_installed = "all",
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false
}
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {pkgs, ... }:
{ {
programs.neovim = { programs.neovim = {
enable = true; enable = true;
@ -12,26 +12,16 @@
package = pkgs.vimPlugins.coc-nvim; package = pkgs.vimPlugins.coc-nvim;
}; };
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
vim-nix vim-smoothie #smooth scrolling
vim-polyglot tokyonight-nvim #color scheme
vim-smoothie undotree # better undos
nvim-tree-lua #extra stuff
nvim-web-devicons nvim-tree-lua # file browser
tokyonight-nvim nvim-web-devicons # for tree-lua
rainbow # telescope-nvim # file finder
indentLine indentLine # indentlines
undotree nvim-treesitter #syntax highlighting
]; ];
extraConfig = '' extraConfig = "lua << EOF\n" + builtins.readFile ./init.lua + "\nEOF";
:lua require("nvim-tree").setup()
set tabstop=2
set expandtab
set shiftwidth=2
set ignorecase
set incsearch
set number
set noswapfile
let mapleader = "'"
'';
}; };
} }

View file

@ -9,6 +9,6 @@
"adblock.js" "adblock.js"
"hidePodcasts.js" "hidePodcasts.js"
]; ];
theme = "SpotifyNoPremium"; theme = spicetify-nix.pkgs.themes.SpotifyNoPremium;
}; };
} }

View file

@ -5,7 +5,6 @@ environment.systemPackages = with pkgs; [
htop #view tasks htop #view tasks
efibootmgr #efi editor efibootmgr #efi editor
maim #screenshooter maim #screenshooter
curlFull
#lightm stuff #lightm stuff
lightdm lightdm
lightdm-mini-greeter lightdm-mini-greeter
@ -42,7 +41,7 @@ environment.systemPackages = with pkgs; [
polkit_fix polkit_fix
#for thunar root #for thunar root
qsudo qsudo
gcc #for neovim tree-sitter
nix-tree nix-tree
]; ];
} }