fmt
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.home.programs.neovim;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./plugins
|
||||
./lsp.nix
|
||||
@@ -22,9 +24,7 @@ in {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
extraLuaConfig =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
-- Use system clipboard
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
config = {
|
||||
programs.neovim = {
|
||||
extraLuaConfig =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
-- Key mappings for various commands and navigation
|
||||
vim.api.nvim_set_keymap("n", "<C-j>", "<C-e>", { noremap = true })
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
# LSP and completions for injected langs
|
||||
otter-nvim
|
||||
@@ -8,9 +9,7 @@
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
@@ -56,9 +55,7 @@
|
||||
plugin = ltex_extra-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
local ltex_extra = require("ltex_extra")
|
||||
add_lsp(lspconfig.ltex, {
|
||||
@@ -84,9 +81,7 @@
|
||||
plugin = cmp-git;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("cmp_git").setup({})
|
||||
'';
|
||||
@@ -97,9 +92,7 @@
|
||||
plugin = nvim-cmp;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
local cmp = require("cmp")
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = alpha-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("nvim-autopairs").setup({})
|
||||
'';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-bqf;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("bqf").setup({})
|
||||
'';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = bufferline-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("bufferline").setup({})
|
||||
'';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-colorizer-lua;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("colorizer").setup({})
|
||||
'';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("Comment").setup({
|
||||
opleader = {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = conform-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("conform").setup({
|
||||
default_format_opts = {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = copilot-lua;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("copilot").setup({
|
||||
panel = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
vim-illuminate
|
||||
];
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = fidget-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("fidget").setup({
|
||||
progress = {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = vim-fugitive;
|
||||
type = "viml";
|
||||
config =
|
||||
/*
|
||||
vim
|
||||
*/
|
||||
# vim
|
||||
''
|
||||
nmap <space>G :Git<CR>
|
||||
'';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("gitsigns").setup({
|
||||
signs = {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = lualine-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim = {
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
none-ls-nvim
|
||||
@@ -6,9 +7,7 @@
|
||||
nvim-treesitter.withAllGrammars
|
||||
];
|
||||
extraConfig =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
-- Require necessary plugins
|
||||
require("plenary")
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = oil-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("oil").setup({
|
||||
buf_options = {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = plenary-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("plenary").setup({})
|
||||
'';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = range-highlight-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("range-highlight").setup({})
|
||||
'';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-web-devicons;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("nvim-web-devicons").setup({})
|
||||
'';
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = which-key-nvim;
|
||||
type = "lua";
|
||||
config =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
require("which-key").setup({})
|
||||
'';
|
||||
|
||||
@@ -3,21 +3,22 @@
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
programs.neovim = {
|
||||
extraConfig =
|
||||
lib.mkAfter # vim
|
||||
|
||||
''
|
||||
function! SetCustomKeywords()
|
||||
syn match Todo /TODO/
|
||||
syn match Done /DONE/
|
||||
syn match Start /START/
|
||||
syn match End /END/
|
||||
endfunction
|
||||
|
||||
autocmd Syntax * call SetCustomKeywords()
|
||||
'';
|
||||
''
|
||||
function! SetCustomKeywords()
|
||||
syn match Todo /TODO/
|
||||
syn match Done /DONE/
|
||||
syn match Start /START/
|
||||
syn match End /END/
|
||||
endfunction
|
||||
|
||||
autocmd Syntax * call SetCustomKeywords()
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
rust-vim
|
||||
dart-vim-plugin
|
||||
@@ -34,15 +35,11 @@
|
||||
|
||||
{
|
||||
plugin = vimtex;
|
||||
config = let
|
||||
viewMethod =
|
||||
if config.programs.zathura.enable
|
||||
then "zathura"
|
||||
else "general";
|
||||
in
|
||||
/*
|
||||
vim
|
||||
*/
|
||||
config =
|
||||
let
|
||||
viewMethod = if config.programs.zathura.enable then "zathura" else "general";
|
||||
in
|
||||
# vim
|
||||
''
|
||||
let g:vimtex_view_method = '${viewMethod}'
|
||||
"Don't open automatically
|
||||
|
||||
Reference in New Issue
Block a user