From 2d42f9e2098ec058460b93a7fca8e747ba0763e1 Mon Sep 17 00:00:00 2001 From: vanten-s Date: Wed, 7 Aug 2024 20:56:11 +0200 Subject: [PATCH] Added silicon for nvim --- dotfiles/nvim/after/init.lua | 1 + dotfiles/nvim/after/silicon.lua | 9 +++++++++ dotfiles/nvim/plugins.lua | 1 + home-modules/silicon.nix | 7 +++++++ home.nix | 1 + 5 files changed, 19 insertions(+) create mode 100644 dotfiles/nvim/after/silicon.lua create mode 100644 home-modules/silicon.nix diff --git a/dotfiles/nvim/after/init.lua b/dotfiles/nvim/after/init.lua index 7d9187d..ef36414 100644 --- a/dotfiles/nvim/after/init.lua +++ b/dotfiles/nvim/after/init.lua @@ -2,5 +2,6 @@ require('vanten.after.treesitter') require('vanten.after.lsp') require('vanten.after.telescope') require('vanten.after.catppuccin') +require('vanten.after.silicon') vim.keymap.set("n", "e", vim.cmd.Ex) diff --git a/dotfiles/nvim/after/silicon.lua b/dotfiles/nvim/after/silicon.lua new file mode 100644 index 0000000..14e41ed --- /dev/null +++ b/dotfiles/nvim/after/silicon.lua @@ -0,0 +1,9 @@ +local silicon = require('nvim-silicon') + +silicon.setup({ + theme = "Dracula", + to_clipboard = true, +}) + +vim.keymap.set('n', 's', silicon.clip, {}) +vim.keymap.set('v', 's', silicon.clip, {}) diff --git a/dotfiles/nvim/plugins.lua b/dotfiles/nvim/plugins.lua index fc01488..506babf 100644 --- a/dotfiles/nvim/plugins.lua +++ b/dotfiles/nvim/plugins.lua @@ -16,4 +16,5 @@ return { ft = { "markdown" }, build = function() vim.fn["mkdp#util#install"]() end, }, + { 'michaelrommel/nvim-silicon' }, } diff --git a/home-modules/silicon.nix b/home-modules/silicon.nix new file mode 100644 index 0000000..8fc3a23 --- /dev/null +++ b/home-modules/silicon.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = [ + pkgs.silicon + ]; +} diff --git a/home.nix b/home.nix index ef705f8..a8ace81 100644 --- a/home.nix +++ b/home.nix @@ -4,6 +4,7 @@ imports = [ ./home-modules/emacs.nix ./home-modules/fetch.nix + ./home-modules/silicon.nix ]; nixpkgs.config.allowUnfree = true;