Merge branch 'nixos' of gitlab.com:elitherl/dotfiles into nixos
This commit is contained in:
commit
ede87d1ccb
|
@ -13,7 +13,7 @@ if not vim.loop.fs_stat(lazypath) then
|
|||
}
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
require("lazy").setup("plugins", require "config.lazy")
|
||||
require("lazy").setup(require "config.lazy")
|
||||
|
||||
-- Set vim options
|
||||
require "config"
|
||||
|
|
6
config/nvim/lua/config/barbar.lua
Normal file
6
config/nvim/lua/config/barbar.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
auto_hide = false,
|
||||
hide = { extensions = true },
|
||||
modified = { button = "●" },
|
||||
pinned = { button = "車", filename = true, separator = { right = "" } },
|
||||
}
|
|
@ -3,6 +3,7 @@ return {
|
|||
term_colors = true,
|
||||
transparent_background = false,
|
||||
integrations = {
|
||||
barbar = true,
|
||||
barbecue = {
|
||||
dim_dirname = true,
|
||||
},
|
||||
|
|
|
@ -14,20 +14,28 @@ return {
|
|||
action = "Telescope find_files",
|
||||
key = "f",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
icon_hl = "@variable",
|
||||
desc = "Projects",
|
||||
group = "Files",
|
||||
action = "Telescope projects",
|
||||
key = "p",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
icon_hl = "@variable",
|
||||
desc = "Terminal",
|
||||
group = "Files",
|
||||
action = "ToggleTerm",
|
||||
key = "|",
|
||||
key = "t",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
desc = "Neotree",
|
||||
group = "Files",
|
||||
action = "Neotree float reveal reveal_force_cwd",
|
||||
key = "/",
|
||||
key = "n",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
|
@ -45,14 +53,6 @@ return {
|
|||
action = "Neogit commit",
|
||||
key = "c",
|
||||
},
|
||||
{
|
||||
icon = " ",
|
||||
icon_hl = "@variable",
|
||||
desc = "Git pull",
|
||||
group = "Label",
|
||||
action = "Neogit pull",
|
||||
key = "p",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
-- Opt
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.showtabline = 2
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.number = true
|
||||
|
|
|
@ -8,8 +8,7 @@ vim.keymap.set("n", "<leader>gg", "<cmd>Neogit kind=split<CR>")
|
|||
vim.keymap.set("n", "<leader>cc", "<cmd>Neogit commit<CR>")
|
||||
vim.keymap.set("n", "<leader>gp", "<cmd>Neogit kind=split pull<CR>")
|
||||
vim.keymap.set("n", "<leader>gP", "<cmd>Neogit kind=split push<CR>")
|
||||
vim.keymap.set("n", "<leader>|", "<cmd>ToggleTerm<CR>")
|
||||
vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm direction=float<CR>")
|
||||
vim.keymap.set("n", "<leader>t", "<cmd>ToggleTerm<CR>")
|
||||
vim.keymap.set({ "n", "t" }, "<A-h>", "<CMD>NavigatorLeft<CR>")
|
||||
vim.keymap.set({ "n", "t" }, "<A-l>", "<CMD>NavigatorRight<CR>")
|
||||
vim.keymap.set({ "n", "t" }, "<A-k>", "<CMD>NavigatorUp<CR>")
|
||||
|
@ -28,7 +27,7 @@ vim.keymap.set("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<cr>"
|
|||
vim.keymap.set("n", "<leader>fp", "<cmd>Telescope projects<cr>")
|
||||
|
||||
-- Neotree
|
||||
vim.keymap.set("n", "/", "<cmd>Neotree float reveal reveal_force_cwd<cr>")
|
||||
vim.keymap.set("n", "<leader>nn", "<cmd>Neotree float reveal reveal_force_cwd<cr>")
|
||||
vim.keymap.set("n", "<leader>nb", "<cmd>Neotree toggle show buffers right<cr>")
|
||||
vim.keymap.set("n", "<leader>ns", "<cmd>Neotree float git_status<cr>")
|
||||
|
||||
|
@ -50,3 +49,49 @@ vim.keymap.set("n", "<leader>tn", "<cmd>TestNearest<cr>")
|
|||
vim.keymap.set("n", "<leader>tl", "<cmd>TestLast<cr>")
|
||||
vim.keymap.set("n", "<leader>tv", "<cmd>TestVisit<cr>")
|
||||
vim.keymap.set("n", "<leader>ti", "<cmd>TestInfo<cr>")
|
||||
|
||||
-- barbar
|
||||
-- local map = vim.api.nvim_set_keymap
|
||||
local map = vim.keymap.set
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Move to previous/next
|
||||
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
|
||||
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
|
||||
-- Re-order to previous/next
|
||||
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
|
||||
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
|
||||
-- Goto buffer in position...
|
||||
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
|
||||
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
|
||||
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
|
||||
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
|
||||
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
|
||||
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
|
||||
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
|
||||
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
|
||||
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
|
||||
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
|
||||
-- Pin/unpin buffer
|
||||
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
|
||||
-- Close buffer
|
||||
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
|
||||
-- Wipeout buffer
|
||||
-- :BufferWipeout
|
||||
-- Close commands
|
||||
-- :BufferCloseAllButCurrent
|
||||
-- :BufferCloseAllButPinned
|
||||
-- :BufferCloseAllButCurrentOrPinned
|
||||
-- :BufferCloseBuffersLeft
|
||||
-- :BufferCloseBuffersRight
|
||||
-- Magic buffer-picking mode
|
||||
map('n', '<C-p>', '<Cmd>BufferPick<CR>', opts)
|
||||
-- Sort automatically by...
|
||||
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
|
||||
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
|
||||
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
|
||||
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)
|
||||
|
||||
-- Other:
|
||||
-- :BarbarEnable - enables barbar (enabled by default)
|
||||
-- :BarbarDisable - very bad command, should never be used
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
return {
|
||||
spec = "plugins",
|
||||
dev = {
|
||||
path = "~/Projects/lua/nvim",
|
||||
},
|
||||
|
@ -32,4 +33,18 @@ return {
|
|||
enabled = true,
|
||||
frequency = 3600,
|
||||
},
|
||||
performance = {
|
||||
rtp = {
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
"matchit",
|
||||
"matchparen",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ return {
|
|||
hide_dotfiles = false,
|
||||
},
|
||||
group_empty_dirs = true,
|
||||
hijack_netrw_behavior = "open_current",
|
||||
},
|
||||
buffers = {
|
||||
bind_to_cwd = true,
|
||||
|
|
8
config/nvim/lua/plugins/barbar.lua
Normal file
8
config/nvim/lua/plugins/barbar.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
init = function() vim.g.barbar_auto_setup = false end,
|
||||
-- opts = require "config.barbar",
|
||||
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
||||
}
|
9
config/nvim/lua/plugins/direnv.lua
Normal file
9
config/nvim/lua/plugins/direnv.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
"https://github.com/direnv/direnv.vim.git",
|
||||
name = "direnv.vim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
vim.g.direnv_auto = 1
|
||||
vim.g.direnv_silent_load = 1
|
||||
end,
|
||||
}
|
|
@ -6,9 +6,10 @@ return {
|
|||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
cmd = "Neotree",
|
||||
config = function()
|
||||
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
vim.g.neo_tree_remove_legacy_commands = 1
|
||||
require("neo-tree").setup(require "config.neotree")
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
"ahmedkhalf/project.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
event = { "VimEnter", "BufReadPre", "BufNewFile" },
|
||||
config = function() require("project_nvim").setup(require "config.project") end,
|
||||
}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./common/work.nix
|
||||
./desktop/gtk.nix
|
||||
];
|
||||
imports = [ ./common/work.nix ];
|
||||
home.stateVersion = "22.11";
|
||||
}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./common/work.nix
|
||||
./desktop/gtk.nix
|
||||
];
|
||||
imports = [ ./common/work.nix ];
|
||||
home.stateVersion = "22.11";
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./common/personal.nix
|
||||
./desktop/gtk.nix
|
||||
./desktop/wayland.nix
|
||||
./env
|
||||
./tui
|
||||
./gui/firefox
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./common/personal.nix
|
||||
./desktop/gtk.nix
|
||||
./desktop/wayland.nix
|
||||
./env
|
||||
./tui
|
||||
./gui/firefox.nix
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../desktop/gtk.nix
|
||||
../desktop/wayland.nix
|
||||
../env
|
||||
../tui
|
||||
../gui/chromium-wayland.nix
|
||||
|
|
4
home/desktop/wayland.nix
Normal file
4
home/desktop/wayland.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ wl-clipboard ];
|
||||
}
|
|
@ -21,6 +21,3 @@ Host freia???
|
|||
|
||||
Host heimdall* jdc* freia* batch
|
||||
User elitherl
|
||||
ForwardX11 yes
|
||||
ForwardX11Timeout 0
|
||||
Compression yes
|
||||
|
|
|
@ -4,5 +4,4 @@ Host legion xenia xenia.me.uk
|
|||
User xenia
|
||||
HostName xenia.me.uk
|
||||
Port 30
|
||||
ForwardX11 no
|
||||
ForwardAgent yes
|
||||
|
|
Loading…
Reference in a new issue