1
Fork 0

Made a few changes

This commit is contained in:
Matei Adriel 2022-07-19 11:03:03 +00:00
parent c7b01d9b6d
commit 7cbe73ad5b
19 changed files with 55 additions and 26 deletions

1
.gitattributes vendored
View file

@ -1 +0,0 @@
secrets.nix filter=git-crypt diff=git-crypt

View file

@ -65,7 +65,7 @@ in
}; };
system.stateVersion = "22.05"; system.stateVersion = "19.03";
# TODO: put nixpkgs stuff inside their own file # TODO: put nixpkgs stuff inside their own file
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

View file

@ -4,6 +4,7 @@
- [Textobjects](https://blog.carbonfive.com/vim-text-objects-the-definitive-guide/) - [Textobjects](https://blog.carbonfive.com/vim-text-objects-the-definitive-guide/)
- [Registers](https://www.brianstorti.com/vim-registers/) - [Registers](https://www.brianstorti.com/vim-registers/)
- [Markers](https://vim.fandom.com/wiki/Using_marks)
## Keybinds ## Keybinds
@ -14,13 +15,15 @@ Table of my own keybinds. Here as documentation for myself. I am yet to include
| Keybind | Description | Plugins | | Keybind | Description | Plugins |
| ------------ | ----------------------------------- | ------------------ | | ------------ | ----------------------------------- | ------------------ |
| vv | Create vertical split | | | _vs_ | Create vertical split | |
| _cp_ | Use system clipboard | | | _cp_ | Use system clipboard | |
| _jl_ | Save | | | _jl_ | Save | |
| _jk_ | Exit insert mode | | | _jk_ | Exit insert mode | |
| _\<leader>k_ | Insert digraph | | | _\<leader>k_ | Insert digraph | |
| _\<leader>a_ | Swap last 2 used buffers | | | _\<leader>a_ | Swap last 2 used buffers | |
| C-n | Open tree | nvim-tree | | C-n | Open tree | nvim-tree |
| _vc_ | Clear vimux window | vimux |
| _vl_ | Rerun last vimux command | vimux |
| _vp_ | Run command in another tmux pane | vimux | | _vp_ | Run command in another tmux pane | vimux |
| C-hjkl | Navigation between vim & tmux panes | vim-tmux-navigator | | C-hjkl | Navigation between vim & tmux panes | vim-tmux-navigator |
| J | Show line diagnostics | lspconfig | | J | Show line diagnostics | lspconfig |
@ -65,6 +68,13 @@ The default brackets I load in each buffer are (), [], "", '', {} and \`\`. Diff
| _rh_ | Refine hole | | _rh_ | Refine hole |
| _ac_ | Add clause | | _ac_ | Add clause |
### Purescript
| Keybind | Description |
| ------- | ------------------------------------------- |
| _vb_ | Make tmux run spago build in sepearate pane |
| _vt_ | Make tmux run spago test in separate pane |
### Lean ### Lean
- Extra brackets: ⟨⟩ - Extra brackets: ⟨⟩

View file

@ -0,0 +1,11 @@
local arpeggio = require("my.plugins.arpeggio")
-- Use vt to test
arpeggio.chordSilent("n", "vt", ":VimuxRunCommand \"clear && spago test\"<CR>",
{settings = "b"})
-- Use vb to build
arpeggio.chordSilent("n", "vb", ":VimuxRunCommand \"clear && spago build\"<CR>",
{settings = "b"})
vim.opt.expandtab = true -- Use spaces for the tab char

View file

@ -22,11 +22,11 @@ function M.mapSilent(mode, lhs, rhs, opts)
end end
function M.setup() function M.setup()
M.map("n", "vv", "<C-w>v") -- Create vertical split
M.map("n", "qq", ":wq<cr>") -- Create vertical split M.map("n", "qq", ":wq<cr>") -- Create vertical split
if arpeggio ~= nil then
-- Create chords -- Create chords
if arpeggio ~= nil then
arpeggio.chord("n", "vs", "<C-w>v") -- Create vertical split
arpeggio.chord("n", "ji", ":w<cr>") -- Saving arpeggio.chord("n", "ji", ":w<cr>") -- Saving
arpeggio.chord("i", "jk", "<Esc>") -- Remap Esc to jk arpeggio.chord("i", "jk", "<Esc>") -- Remap Esc to jk
arpeggio.chord("i", "<Leader>k", "<C-k><cr>") -- Rebind digraph insertion to leader+k arpeggio.chord("i", "<Leader>k", "<C-k><cr>") -- Rebind digraph insertion to leader+k

View file

@ -1,7 +1,7 @@
local au = require("my.helpers.augroup") local au = require("my.helpers.augroup")
local M = {} local M = {}
local syntaxFiles = {bkf = "bkf"} local syntaxFiles = {hkf = "hkf"}
function M.setup() function M.setup()
au.augroup("myfiledetection", function() au.augroup("myfiledetection", function()

View file

@ -36,7 +36,9 @@ function M.setup()
"hrsh7th/nvim-cmp", -- completion engine "hrsh7th/nvim-cmp", -- completion engine
"L3MON4D3/LuaSnip", -- snippeting engine "L3MON4D3/LuaSnip", -- snippeting engine
"saadparwaiz1/cmp_luasnip", -- snippet support for cmp "saadparwaiz1/cmp_luasnip", -- snippet support for cmp
"wakatime/vim-wakatime" -- track time usage "wakatime/vim-wakatime", -- track time usage
"vmchale/dhall-vim", -- dhall syntax highlighting
"folke/which-key.nvim"
} }
for _, v in ipairs(themePackages) do for _, v in ipairs(themePackages) do

View file

@ -14,7 +14,7 @@ function M.setup()
local luasnip = require("luasnip") local luasnip = require("luasnip")
local options = { local options = {
formatting = {format = lspkind.cmp_format()}, formatting = {format = lspkind.cmp_format({mode = "symbol"})},
snippet = { snippet = {
-- REQUIRED - you must specify a snippet engine -- REQUIRED - you must specify a snippet engine
expand = function(args) expand = function(args)

View file

@ -5,6 +5,7 @@ function M.setup()
require('nvim-autopairs').setup() require('nvim-autopairs').setup()
require("startup").setup() require("startup").setup()
require("presence"):setup({}) -- wtf does the : do here? require("presence"):setup({}) -- wtf does the : do here?
-- require("which-key").setup()
-- Plugins with their own configs: -- Plugins with their own configs:
require("my.plugins.vim-tmux-navigator").setup() require("my.plugins.vim-tmux-navigator").setup()

View file

@ -71,6 +71,7 @@ end
-- General server config -- General server config
local servers = { local servers = {
tsserver = {on_attach = on_attach_typescript}, tsserver = {on_attach = on_attach_typescript},
dhall_lsp_server = {},
sumneko_lua = { sumneko_lua = {
settings = { settings = {
Lua = { Lua = {

View file

@ -12,7 +12,8 @@ function M.setup()
lualine_b = {'branch', 'diff', 'diagnostics'}, lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'}, lualine_c = {'filename'},
lualine_x = {}, lualine_x = {},
lualine_y = {'encoding', 'fileformat', 'filetype'}, -- lualine_y = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'filetype'},
lualine_z = {'location'} lualine_z = {'location'}
}, },
-- Integration with other plugins -- Integration with other plugins

View file

@ -6,10 +6,10 @@ local M = {}
function M.setup() function M.setup()
vim.g.tmux_navigator_no_mappings = 1 vim.g.tmux_navigator_no_mappings = 1
map("n", "C-h", ":TmuxNavigateLeft<cr>") map("n", "<C-h>", ":TmuxNavigateLeft<cr>")
map("n", "C-j", ":TmuxNavigateDown<cr>") map("n", "<C-j>", ":TmuxNavigateDown<cr>")
map("n", "C-k", ":TmuxNavigateUp<cr>") map("n", "<C-k>", ":TmuxNavigateUp<cr>")
map("n", "C-l", ":TmuxNavigateRight<cr>") map("n", "<C-l>", ":TmuxNavigateRight<cr>")
end end
return M return M

View file

@ -4,6 +4,8 @@ local M = {}
function M.setup() function M.setup()
arpeggio.chordSilent("n", "vp", ":VimuxPromptCommand<CR>") arpeggio.chordSilent("n", "vp", ":VimuxPromptCommand<CR>")
arpeggio.chordSilent("n", "vc", ":VimuxRunCommand \"clear\"<CR>")
arpeggio.chordSilent("n", "vl", ":VimuxRunLastCommand<CR>")
end end
return M return M

View file

@ -34,7 +34,7 @@
# editors # editors
# vscodium # vscodium
vscode # vscode
# vim # vim
# emacs # emacs
vimclip # use neovim anywhere vimclip # use neovim anywhere
@ -50,7 +50,7 @@
# browsers # browsers
unstable.google-chrome unstable.google-chrome
# brave # brave
firefox # firefox
# other stuff # other stuff
obsidian # knowedge base obsidian # knowedge base
@ -67,7 +67,7 @@
# blueman # bluetooth manager # blueman # bluetooth manager
# freesweep # minesweeper I can play w the keyboard. # freesweep # minesweeper I can play w the keyboard.
# multimc # multimc
lmms # music software # lmms # music software
# Nes emulators and stuff # Nes emulators and stuff
# zsnes # zsnes
@ -75,9 +75,9 @@
# fceux # fceux
# games # games
# tetrio-desktop # tetrio-desktop # competitive tetris
vassal # vassal # wargame engine
# mindustry # mindustry # factory building game
# edopro # edopro # yugioh sim
]; ];
} }

View file

@ -1,4 +1,4 @@
{ {
shellInit = ""; shellInit = "export GITHUB_TOKEN=$(cat ~/water/gh-token)";
# "neofetch --package_managers on --cpu_brand on --cpu_cores on --memory_percent on --memory_display infobar --os_arch on"; # "neofetch --package_managers on --cpu_brand on --cpu_cores on --memory_percent on --memory_display infobar --os_arch on";
} }

View file

@ -1,11 +1,9 @@
{ pkgs, ... }: { pkgs, ... }:
with import ../../../secrets.nix;
let let
theme = pkgs.myThemes.current; theme = pkgs.myThemes.current;
variables = { variables = {
# Configure github cli # Configure github cli
GITHUB_USERNAME = "Mateiadrielrafael"; GITHUB_USERNAME = "Mateiadrielrafael";
inherit GITHUB_TOKEN;
# Sets neovim as default editor # Sets neovim as default editor
EDITOR = "nvim"; EDITOR = "nvim";

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
with import ../secrets.nix; { {
# Disable asking for password for sudo # Disable asking for password for sudo
security.sudo.extraRules = [ security.sudo.extraRules = [
{ {
@ -14,8 +14,7 @@ with import ../secrets.nix; {
users = { users = {
mutableUsers = false; mutableUsers = false;
users.adrielus = { users.adrielus = {
inherit hashedPassword; passwordFile = "~/water/pass";
extraGroups = [ "wheel" "networkmanager" "lp" "docker" ]; extraGroups = [ "wheel" "networkmanager" "lp" "docker" ];
isNormalUser = true; isNormalUser = true;
shell = pkgs.fish; shell = pkgs.fish;

5
secrets.nix Normal file
View file

@ -0,0 +1,5 @@
{
hashedPassword =
"$6$BRf2CtFq$xFyfiUjXpSLZSlbgmygv5JVxqiDy0U1Kn12lr3hTO07iHivu70kdASHm4Gg4EyVjNDMMJi8NlsEEH9HNtV9rA1";
GITHUB_TOKEN = "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";
}