From 4fd9616a4c991ad84913076ced1bcef75d43a346 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Mon, 11 Oct 2021 16:49:55 +0200 Subject: [PATCH] remove nix --- configs/.tmux.conf | 9 ++++++++- configs/.zshrc | 8 +++++++- configs/home.nix | 35 +++++++++++++++++++++++++++-------- configs/init.lua | 11 ++++++++--- configs/lua/lua | 1 + setup.sh | 7 +++++++ 6 files changed, 58 insertions(+), 13 deletions(-) create mode 120000 configs/lua/lua diff --git a/configs/.tmux.conf b/configs/.tmux.conf index 4388f32..5eee43a 100644 --- a/configs/.tmux.conf +++ b/configs/.tmux.conf @@ -1,10 +1,17 @@ -set -g default-terminal "screen-256color" +set-option -g default-terminal "screen-256color" +set-option -ga terminal-overrides ",xterm-256color:Tc" + +set-option -g focus-events on +set-option -sg escape-time 10 + +set -g destroy-unattached # remap prefix from 'C-b' to 'C-a' unbind C-b set-option -g prefix C-a bind-key C-a send-prefix + # split panes using | and - bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" diff --git a/configs/.zshrc b/configs/.zshrc index dcf6f3a..c05e0c4 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -14,7 +14,8 @@ plugins=( git docker tmux - zsh-autosuggestions + asdf + zsh-autosuggestions ) eval `dircolors ~/.dircolors` @@ -50,6 +51,10 @@ if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi +if [ -d "$HOME/.asdf" ] ; then + . "$HOME/.asdf/asdf.sh" +fi + #If fdfind is installed force fzf to use it if type fdfind &> /dev/null ; then export FZF_DEFAULT_COMMAND='fdfind --type f' @@ -67,3 +72,4 @@ fi export PNPM_HOME="$HOME/.local/share/pnpm" export PATH="$PNPM_HOME:$PATH" +if [ -e /home/jim/.nix-profile/etc/profile.d/nix.sh ]; then . /home/jim/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer diff --git a/configs/home.nix b/configs/home.nix index 02db62c..a7a2ebd 100644 --- a/configs/home.nix +++ b/configs/home.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: + { @@ -8,7 +9,6 @@ programs.zsh.enable = true; home.packages = [ - pkgs.neovim pkgs.zsh pkgs.direnv @@ -27,17 +27,36 @@ # Let Home Manager install and manage itself. programs.home-manager.enable = true; + nixpkgs.overlays = [ + (import (builtins.fetchTarball { + url = https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz; + })) + ]; + + programs.neovim = { + enable = true; + package = pkgs.neovim-nightly; + }; + # Home Manager needs a bit of information about you and the # paths it should manage. home.username = "jim"; home.homeDirectory = "/home/jim"; - xdg.configFile."nvim/init.lua".source = ./init.lua; - home.file.".zshrc".source = ./.zshrc; - home.file.".bashrc".source = ./.bashrc; - home.file.".p10k.zsh".source = ./.p10k.zsh; - home.file.".tmux.conf".source = ./.tmux.conf; - home.file.".dircolors".source = ./.dircolors; + home.file = { + ".zshrc".source = ./.zshrc; + ".bashrc".source = ./.bashrc; + ".p10k.zsh".source = ./.p10k.zsh; + ".tmux.conf".source = ./.tmux.conf; + ".dircolors".source = ./.dircolors; + # ".local/share/nvim/site/pack/paqs/start/paq-nvim".source = pkgs.fetchzip { + # url = "https://github.com/savq/paq-nvim/archive/refs/heads/master.zip"; + # }; + }; + + xdg.configFile = { + "nvim/init.lua".source = ./init.lua; + }; # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage diff --git a/configs/init.lua b/configs/init.lua index a820fa8..9c7bffb 100644 --- a/configs/init.lua +++ b/configs/init.lua @@ -7,7 +7,7 @@ local cmd = vim.cmd require("install-paq") local paq = require("paq") -paq:setup { +paq:setup ({verbose = true}) { "savq/paq-nvim", -- Let Paq manage itself -- General Helper Function "nvim-lua/plenary.nvim", @@ -26,6 +26,7 @@ paq:setup { "junegunn/fzf", "nvim-lua/popup.nvim", "nvim-telescope/telescope.nvim", + "windwp/nvim-autopairs", -- For better git support "tpope/vim-fugitive", -- Postman like featuresi @@ -55,7 +56,7 @@ paq:setup { if u.has_plugin("cmp") then -- Global options o.number = true - o.tabstop = 8 + o.tabstop = 2 o.shiftwidth = 2 -- Indents will have a width of 4 o.softtabstop = 2 -- Sets the number of columns for a TAB o.expandtab = false -- Dont expand TABs to spaces @@ -140,6 +141,8 @@ if u.has_plugin("cmp") then } } + require'nvim-autopairs'.setup() + -- Treesitter config local parser_configs = require("nvim-treesitter.parsers").get_parser_configs() parser_configs.http = { @@ -218,5 +221,7 @@ if u.has_plugin("cmp") then else paq.install() - u.ReloadConfig() + paq.list() + print "Installed Packages" + -- u.ReloadConfig() end diff --git a/configs/lua/lua b/configs/lua/lua new file mode 120000 index 0000000..df9382c --- /dev/null +++ b/configs/lua/lua @@ -0,0 +1 @@ +/home/jim/.dotfiles/configs/lua \ No newline at end of file diff --git a/setup.sh b/setup.sh index 25d56a5..658abd6 100755 --- a/setup.sh +++ b/setup.sh @@ -105,6 +105,13 @@ if [ "$INST_ASDF" = true ]; then [[ "$INST_RUST" = true ]] && asdfInstall rust fi +echo "-- linking .dotfiles --" + +linkFile .bashrc +linkFile .p10k.zsh +linkFile .dircolors +linkFile .tmux.conf + if [ "$INST_ZSH" = true ]; then echo "-- installing oh-my-zsh --" linkFile .zshrc