Compare commits
No commits in common. "285e007180c3d7744ad54ce4bab95e3fcc480493" and "c26b837282b5209eb92b723cb5b0f3a5d263f591" have entirely different histories.
285e007180
...
c26b837282
8 changed files with 115 additions and 3 deletions
|
@ -116,13 +116,16 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
windowRules = {
|
windowRules = {
|
||||||
|
# Auto workspace
|
||||||
|
zen = [ "workspace 1 silent" ];
|
||||||
|
discord = [ "workspace name:HDMI-A-1" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
windowRulesV2 = {
|
||||||
# ULauncher
|
# ULauncher
|
||||||
"class:^(ulauncher)$" = [
|
"class:^(ulauncher)$" = [
|
||||||
"dimaround"
|
"dimaround"
|
||||||
];
|
];
|
||||||
# Auto workspace
|
|
||||||
"class:zen" = [ "workspace 1 silent" ];
|
|
||||||
"class:discord" = [ "workspace name:HDMI-A-1" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -84,6 +84,11 @@
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
windowRulesV2 = mkOption {
|
||||||
|
type = types.attrsOf (types.listOf types.str);
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
|
||||||
binds = mkOption {
|
binds = mkOption {
|
||||||
type = types.attrsOf types.str;
|
type = types.attrsOf types.str;
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -274,6 +279,13 @@
|
||||||
x = ident: values: map (y ident) values;
|
x = ident: values: map (y ident) values;
|
||||||
in
|
in
|
||||||
lib.flatten (lib.mapAttrsToList x cfg.windowRules);
|
lib.flatten (lib.mapAttrsToList x cfg.windowRules);
|
||||||
|
|
||||||
|
windowrulev2 =
|
||||||
|
let
|
||||||
|
y = ident: value: "${value},${ident}";
|
||||||
|
x = ident: values: map (y ident) values;
|
||||||
|
in
|
||||||
|
lib.flatten (lib.mapAttrsToList x cfg.windowRulesV2);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
1
modules/new_nvim/config/init.lua
Normal file
1
modules/new_nvim/config/init.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require("config.lazy")
|
35
modules/new_nvim/config/lua/config/lazy.lua
Normal file
35
modules/new_nvim/config/lua/config/lazy.lua
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||||
|
-- loading lazy.nvim so that mappings are correct.
|
||||||
|
-- This is also a good place to setup other settings (vim.opt)
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
-- Setup lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- import your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
|
-- colorscheme that will be used when installing plugins.
|
||||||
|
install = { colorscheme = { "habamax" } },
|
||||||
|
-- automatically check for plugin updates
|
||||||
|
checker = { enabled = true },
|
||||||
|
})
|
8
modules/new_nvim/config/lua/config/plugins/theming.lua
Normal file
8
modules/new_nvim/config/lua/config/plugins/theming.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
name = "catppuccin",
|
||||||
|
priority = 1000,
|
||||||
|
init = function() vim.cmd.colorscheme("catppuccin-mocha") end
|
||||||
|
},
|
||||||
|
}
|
38
modules/new_nvim/default.nix
Normal file
38
modules/new_nvim/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home-manager.users.kalle = {
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
nodejs_22 # Required for copilot-vim
|
||||||
|
ripgrep # Required for telescope
|
||||||
|
wl-clipboard # Required for clipboard sync
|
||||||
|
|
||||||
|
# Language servers
|
||||||
|
clang-tools
|
||||||
|
lua-language-server
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
nodePackages."@astrojs/language-server"
|
||||||
|
typescript
|
||||||
|
tailwindcss-language-server
|
||||||
|
gopls
|
||||||
|
vhdl-ls
|
||||||
|
nixd
|
||||||
|
nixfmt-rfc-style
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile.nvim = {
|
||||||
|
source = ./config;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -22,6 +22,7 @@
|
||||||
vimdiffAlias = true;
|
vimdiffAlias = true;
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
|
nodejs_22 # Required for copilot-vim
|
||||||
ripgrep # Required for telescope
|
ripgrep # Required for telescope
|
||||||
wl-clipboard # Required for clipboard sync
|
wl-clipboard # Required for clipboard sync
|
||||||
|
|
||||||
|
@ -97,6 +98,7 @@
|
||||||
cmp-git
|
cmp-git
|
||||||
cmp-calc
|
cmp-calc
|
||||||
cmp_luasnip
|
cmp_luasnip
|
||||||
|
copilot-cmp
|
||||||
luasnip
|
luasnip
|
||||||
friendly-snippets
|
friendly-snippets
|
||||||
{
|
{
|
||||||
|
@ -120,6 +122,16 @@
|
||||||
plugin = (nvim-treesitter.withAllGrammars);
|
plugin = (nvim-treesitter.withAllGrammars);
|
||||||
config = toLuaFile ./plugin/treesitter.lua;
|
config = toLuaFile ./plugin/treesitter.lua;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin = copilot-lua;
|
||||||
|
config = toLua ''
|
||||||
|
require("copilot").setup({
|
||||||
|
suggestion = { enabled = false },
|
||||||
|
panel = { enabled = false },
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
extraLuaConfig = ''
|
extraLuaConfig = ''
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
|
|
||||||
|
require("copilot_cmp").setup()
|
||||||
|
|
||||||
local has_words_before = function()
|
local has_words_before = function()
|
||||||
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end
|
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
@ -45,6 +47,7 @@ cmp.setup({
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
{ name = "copilot", group_index = 2 },
|
||||||
{ name = 'path' }, -- file paths
|
{ name = 'path' }, -- file paths
|
||||||
{ name = 'nvim_lsp' }, -- from language server
|
{ name = 'nvim_lsp' }, -- from language server
|
||||||
{ name = 'nvim_lsp_signature_help' }, -- display function signatures with current parameter emphasized
|
{ name = 'nvim_lsp_signature_help' }, -- display function signatures with current parameter emphasized
|
||||||
|
|
Loading…
Add table
Reference in a new issue