1
0
forked from extern/zaneyos

Massive improvements to Neovim Configuration

This commit is contained in:
Tyler Kelley 2024-02-06 08:28:33 -06:00
parent cbd8591c5c
commit 92fc9ac086

View File

@ -2,17 +2,64 @@
let
plugins = pkgs.vimPlugins;
inherit (import ../../options.nix) theme;
in {
programs.nixvim = {
enable = true;
plugins = {
telescope.enable = true;
airline = {
enable = true;
powerlineFonts = true;
theme = "tomorrow";
};
comment-nvim.enable = true;
lsp = {
enable = true;
servers = {
tsserver.enable = true;
lua-ls.enable = true;
rust-analyzer = {
enable = true;
installRustc = true;
installCargo = true;
};
nixd.enable = true;
html.enable = true;
ccls.enable = true;
cmake.enable = true;
csharp-ls.enable = true;
cssls.enable = true;
gopls.enable = true;
jsonls.enable = true;
pyright.enable = true;
tailwindcss.enable = true;
};
};
treesitter.enable = true;
nvim-cmp = {
enable = true;
autoEnableSources = true;
sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
mapping = {
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<Tab>" = {
action = ''cmp.mapping.select_next_item()'';
modes = [ "i" "s" ];
};
};
};
};
extraPlugins = [
plugins.telescope-nvim
plugins.rose-pine
plugins.nvim-treesitter
plugins.nvim-treesitter.withAllGrammars
plugins.vim-airline-themes
plugins.nvim-base16
];
colorscheme = "rose-pine";
globals.mapleader = " "; # Sets the leader key to space
@ -24,6 +71,12 @@ in {
end)
'';
extraConfigVim = ''
set noshowmode
set showtabline=2
colorscheme base16-${theme}
'';
keymaps = [
{
mode = "n";
@ -37,6 +90,16 @@ in {
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
shiftwidth = 2; # Tab width should be 2
softtabstop = 2;
smartindent = true;
wrap = false;
swapfile = false;
backup = false;
hlsearch = false;
incsearch = true;
termguicolors = true;
scrolloff = 8;
updatetime = 50;
};
};