added NxACE (untested)
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
{ config, pkgs, rice, ... }:
|
||||
{ config, pkgs, pkgs-unstable, lib, user, rice, ... }:
|
||||
let
|
||||
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
||||
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
||||
|
||||
theme = {
|
||||
name = "base16-colorscheme";
|
||||
package = pkgs-unstable.vimPlugins.base16-nvim;
|
||||
};
|
||||
in
|
||||
lib.mkIf (user != "tv")
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
neovide
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
@@ -12,86 +22,99 @@ in
|
||||
vimdiffAlias = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
lua-language-server
|
||||
# rnix-lsp
|
||||
|
||||
xclip
|
||||
# extra
|
||||
wl-clipboard
|
||||
|
||||
# LSPs
|
||||
nixd
|
||||
lua-language-server
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
config = toLuaFile ./nvim-lua/plugin/lsp.lua;
|
||||
}
|
||||
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
config = toLua ''require("Comment").setup()'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = gruvbox-nvim;
|
||||
config = "colorscheme gruvbox";
|
||||
}
|
||||
|
||||
neodev-nvim
|
||||
|
||||
nvim-cmp
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
config = toLuaFile ./nvim-lua/plugin/cmp.lua;
|
||||
}
|
||||
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
config = toLuaFile ./nvim-lua/plugin/telescope.lua;
|
||||
}
|
||||
|
||||
nvim-lspconfig
|
||||
nvim-cmp # A completion engine. Completion sources are installed from external repositories and "sourced".
|
||||
cmp-nvim-lsp # cmp source: LSPs
|
||||
luasnip # cmp source: LSPs
|
||||
nvim-web-devicons # icons or some shit
|
||||
friendly-snippets # a collention of snippets for many languages
|
||||
neodev-nvim # configures lua-language-server for Neovim
|
||||
vim-nix # Syntax highlighting, Filetype detection, Automatic indentation, NixEdit command: navigate nixpkgs by attribute name
|
||||
telescope-nvim
|
||||
telescope-fzf-native-nvim
|
||||
|
||||
cmp_luasnip
|
||||
cmp-nvim-lsp
|
||||
|
||||
luasnip
|
||||
friendly-snippets
|
||||
|
||||
|
||||
lualine-nvim
|
||||
nvim-web-devicons
|
||||
|
||||
{
|
||||
plugin = (nvim-treesitter.withPlugins (p: [
|
||||
p.tree-sitter-nix
|
||||
p.tree-sitter-vim
|
||||
p.tree-sitter-bash
|
||||
p.tree-sitter-lua
|
||||
p.tree-sitter-python
|
||||
p.tree-sitter-json
|
||||
]));
|
||||
config = toLuaFile ./nvim-lua/plugin/treesitter.lua;
|
||||
}
|
||||
|
||||
vim-nix
|
||||
|
||||
# {
|
||||
# plugin = vimPlugins.own-onedark-nvim;
|
||||
# config = "colorscheme onedark";
|
||||
# }
|
||||
];
|
||||
comment-nvim
|
||||
(nvim-treesitter.withPlugins (p: with p; [
|
||||
tree-sitter-nix
|
||||
tree-sitter-vim
|
||||
tree-sitter-bash
|
||||
tree-sitter-lua
|
||||
tree-sitter-python
|
||||
tree-sitter-json
|
||||
tree-sitter-html
|
||||
tree-sitter-css
|
||||
tree-sitter-dockerfile
|
||||
tree-sitter-ssh_config
|
||||
tree-sitter-javascript
|
||||
tree-sitter-gitignore
|
||||
])
|
||||
)
|
||||
] ++ [ theme.package ];
|
||||
|
||||
extraLuaConfig = ''
|
||||
${builtins.readFile ./nvim-lua/options.lua}
|
||||
'';
|
||||
-- Options
|
||||
vim.keymap.set("n", "<Space>", "<Nop>")
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
vim.o.signcolumn = 'yes'
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
vim.o.updatetime = 300
|
||||
vim.o.termguicolors = true
|
||||
vim.o.mouse = 'a'
|
||||
|
||||
# extraLuaConfig = ''
|
||||
# ${builtins.readFile ./nvim-lua/options.lua}
|
||||
# ${builtins.readFile ./nvim-lua/plugin/lsp.lua}
|
||||
# ${builtins.readFile ./nvim-lua/plugin/cmp.lua}
|
||||
# ${builtins.readFile ./nvim-lua/plugin/telescope.lua}
|
||||
# ${builtins.readFile ./nvim-lua/plugin/treesitter.lua}
|
||||
# ${builtins.readFile ./nvim-lua/plugin/other.lua}
|
||||
# '';
|
||||
-- Colorscheme
|
||||
require('base16-colorscheme').setup({
|
||||
base00 = '${rice.color.background}',
|
||||
base01 = '${rice.color.bright-black}',
|
||||
base02 = '${rice.color.blue}',
|
||||
base03 = '${rice.color.bright-blue}',
|
||||
base04 = '${rice.color.cyan}',
|
||||
base05 = '${rice.color.bright-cyan}',
|
||||
base06 = '${rice.color.green}',
|
||||
base07 = '${rice.color.bright-green}',
|
||||
base08 = '${rice.color.magenta}',
|
||||
base09 = '${rice.color.bright-magenta}',
|
||||
base0A = '${rice.color.red}',
|
||||
base0B = '${rice.color.bright-red}',
|
||||
base0C = '${rice.color.foreground}',
|
||||
base0D = '${rice.color.bright-white}',
|
||||
base0E = '${rice.color.yellow}',
|
||||
base0F = '${rice.color.bright-yellow}',
|
||||
})
|
||||
require('base16-colorscheme').with_config({
|
||||
telescope = true,
|
||||
-- indentblankline = true,
|
||||
-- notify = true,
|
||||
-- ts_rainbow = true,
|
||||
cmp = true,
|
||||
-- illuminate = true,
|
||||
-- dapui = true,
|
||||
})
|
||||
|
||||
-- PLUGINS
|
||||
require("Comment").setup()
|
||||
require("lualine").setup({
|
||||
icons_enabled = true,
|
||||
theme = '${theme.name}',
|
||||
})
|
||||
require("Comment").setup()
|
||||
${builtins.readFile ./nvim-lua/plugin/lsp.lua}
|
||||
${builtins.readFile ./nvim-lua/plugin/cmp.lua}
|
||||
${builtins.readFile ./nvim-lua/plugin/telescope.lua}
|
||||
${builtins.readFile ./nvim-lua/plugin/treesitter.lua}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user