Skip to content

Commit

Permalink
add nnn
Browse files Browse the repository at this point in the history
  • Loading branch information
steelsojka committed Oct 9, 2023
1 parent e547bf6 commit 3be7bd0
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
1 change: 1 addition & 0 deletions .aliases
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
alias vim="nvim"
alias p="cd ~/src"
alias nnn="nnn -e"

# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
Expand Down
2 changes: 1 addition & 1 deletion .config/kitty/kitty_base.conf
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ scrollback_lines 5000

#: Color scheme {{{

include ~/.local/share/nvim/site/pack/packer/start/tokyonight.nvim/extras/kitty/tokyonight_night.conf
include ~/.local/share/nvim/lazy/tokyonight.nvim/extras/kitty/tokyonight_night.conf

#foreground #bbbbbb
#background #121419
Expand Down
8 changes: 4 additions & 4 deletions .config/nvim/fnl/dotfiles/module/mappings.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"fS" {:do "<Cmd>wa<CR>" :description "Save all files"}
"f/" {:do #(telescope.current_buffer_fuzzy_find) :description "Search lines"}
"ff" {:do "<Cmd>Format<CR>" :description "Format file"}
"fo" {:do "<Cmd>Dirvish %:p:h<CR>" :description "Show in tree"}
"fO" {:do "<Cmd>vsp +Dirvish %:p:h<CR>" :description "Show in split tree"}
"fo" {:do "<Cmd>NnnPicker %:p:h<CR>" :description "Show in tree"}
"fO" {:do "<Cmd>NnnExplorer %:p:h<CR>" :description "Show in split tree"}
"fr" {:do #(telescope.oldfiles) :description "Open recent files"}
"fu" {:do "<Cmd>UndotreeToggle<CR>" :description "Undo tree"}
"fU" {:do "<Cmd>UndotreeFocus<CR>" :description "Focus undo tree"}
Expand Down Expand Up @@ -137,8 +137,8 @@
"psc" {:do "<Cmd>SClose<CR>" :description "Project session close"}
"psd" {:do #(sessions.delete-session true) :description "Delete (default)"}
"psD" {:do #(sessions.delete-session) :description "Delete"}
"pT" {:do "<Cmd>vsp +Dirvish<CR>" :description "Open File explorer in split"}
"pt" {:do "<Cmd>Dirvish<CR>" :description "Open file Explorer"}
"pT" {:do "<Cmd>NnnExplorer<CR>" :description "Open File explorer in split"}
"pt" {:do "<Cmd>NnnPicker" :description "Open file Explorer"}
"pq" {:do "<Cmd>qall<CR>" :description "Quit project"}
"pQ" {:do "<Cmd>qall!<CR>" :description "Quit project force"}
"pc" {:do #(ws.cd-to-root) :description "Cwd to root"}
Expand Down
3 changes: 3 additions & 0 deletions .config/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ return {
"tpope/vim-fugitive",
{"mbbill/undotree", cmd = "UndotreeToggle"},
"tpope/vim-surround",
{
"luukvbaal/nnn.nvim",
config = function() require "nnn".setup() end},
"justinmk/vim-dirvish",
"kristijanhusak/vim-dirvish-git",
"arthurxavierx/vim-caser",
Expand Down
6 changes: 5 additions & 1 deletion .exports
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
export ZSH=$HOME/.oh-my-zsh
# Make vim the default editor
export EDITOR="nvim"
export TERM="xterm-256color"

# Larger bash history (allow 32³ entries; default is 500)
export HISTSIZE=32768
Expand Down Expand Up @@ -39,3 +38,8 @@ export FZF_DEFAULT_COMMAND='rg --files -g "!{node_modules/*}"'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_DEFAULT_OPTS="--bind ctrl-a:toggle-all --layout=reverse --margin=1,1 --color=marker:12,pointer:12,hl:#7d7abc,hl+:#7d7abc"
export FZF_ALT_C_OPTS="--preview 'ls -la {}'"

# NNN

export NNN_PLUG='f:finder;F:fzcd;o:fzopen;d:diffs'
export NNN_FIFO='/tmp/nnn.fifo'
9 changes: 7 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/5148520bfab61f99fd25fb9ff7bfbb50dad3c9db.tar.gz") {} }:
{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
packages = [
Expand All @@ -17,9 +17,14 @@ pkgs.mkShell {
pkgs.w3m
pkgs.fd
pkgs.diff-so-fancy
pkgs.cargo
pkgs.tmux
pkgs.sshfs
pkgs.rclone
(pkgs.nnn.override { withNerdIcons = true; })
];

shellHook = ''
shellHooks = ''
source ~/.path
'';
}
3 changes: 3 additions & 0 deletions scripts/init-dotfiles
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ rm -r $HOME/.dotfiles-tmp

# Install nix
sh <(curl -L https://nixos.org/nix/install) --no-daemon

# Install nnn plugins
sh -c "$(curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs)"

0 comments on commit 3be7bd0

Please sign in to comment.