Browse Source

Merge branch 'frigg' of cmte/dotfiles into main

cmte 1 năm trước cách đây
mục cha
commit
45c9e2e220
4 tập tin đã thay đổi với 32 bổ sung17 xóa
  1. 4 0
      bash/bashrc
  2. 7 12
      nvim/init.lua
  3. 2 2
      nvim/main.sh
  4. 19 3
      zsh/zshrc

+ 4 - 0
bash/bashrc

@@ -43,3 +43,7 @@ ssh-add -q $HOME/.ssh/github > /dev/null
 # bun
 export BUN_INSTALL="$HOME/.bun"
 export PATH=$BUN_INSTALL/bin:$PATH
+
+#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
+export SDKMAN_DIR="$HOME/.sdkman"
+[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"

+ 7 - 12
nvim/init.lua

@@ -101,6 +101,9 @@ require('lazy').setup({
       'L3MON4D3/LuaSnip',
       'saadparwaiz1/cmp_luasnip',
 
+      'hrsh7th/cmp-path',
+
+
       -- Adds LSP completion capabilities
       'hrsh7th/cmp-nvim-lsp',
 
@@ -155,16 +158,7 @@ require('lazy').setup({
     },
   },
 
-  {
-    -- Add indentation guides even on blank lines
-    'lukas-reineke/indent-blankline.nvim',
-    -- Enable `lukas-reineke/indent-blankline.nvim`
-    -- See `:help indent_blankline.txt`
-    opts = {
-      char = '┊',
-      show_trailing_blankline_indent = false,
-    },
-  },
+ 
 
   -- "gc" to comment visual regions/lines
   { 'numToStr/Comment.nvim', opts = {} },
@@ -495,7 +489,7 @@ cmp.setup {
     ['<C-d>'] = cmp.mapping.scroll_docs(-4),
     ['<C-f>'] = cmp.mapping.scroll_docs(4),
     ['<C-Space>'] = cmp.mapping.complete {},
-    ['<CR>'] = cmp.mapping.confirm {
+    ['<C-y>'] = cmp.mapping.confirm {
       behavior = cmp.ConfirmBehavior.Replace,
       select = true,
     },
@@ -521,7 +515,8 @@ cmp.setup {
   sources = {
     { name = 'nvim_lsp' },
     { name = 'luasnip' },
-  },
+    { name = 'path' },
+  }
 }
 
 -- The line beneath this is called `modeline`. See `:help modeline`

+ 2 - 2
nvim/main.sh

@@ -8,8 +8,8 @@ LOCAL=$HOME/.config/nvim
 # if $LOCAL does not exists, create it
 test -d $LOCAL || mkdir -p $LOCAL
 
-cp -r lua $LOCAL
-cp *.lua $LOCAL
+cp -r nvim/lua $LOCAL
+cp nvim/*.lua $LOCAL
 
 
 nvim --headless "+Lazy! sync" +qa

+ 19 - 3
zsh/zshrc

@@ -1,5 +1,5 @@
 # If you come from bash you might have to change your $PATH.
-# export PATH=$HOME/bin:/usr/local/bin:$PATH
+# export PATH=$HOME/bin:/usr/local/bin:$PATH/th
 
 # Path to your oh-my-zsh installation.
 export ZSH="$HOME/.oh-my-zsh"
@@ -70,8 +70,9 @@ ZSH_THEME="robbyrussell"
 # Custom plugins may be added to $ZSH_CUSTOM/plugins/
 # Example format: plugins=(rails git textmate ruby lighthouse)
 # Add wisely, as too many plugins slow down shell startup.
-plugins=(git ssh-agent)
+plugins=(git ssh-agent rust)
 
+zstyle :omz:plugins:ssh-agent identities ~/.ssh/{github,ansible}
 source $ZSH/oh-my-zsh.sh
 
 # User configuration
@@ -109,15 +110,30 @@ PATH=$PATH:$HOME/.cargo/bin
 
 #go
 PATH=$PATH:/usr/local/go/bin
+PATH=$PATH:$HOME/go/bin
 
 #bun
 PATH=$PATH:$HOME/.bun/bin
-
 # local bin
 PATH=$PATH:$HOME/.local/bin
 
+
 export PATH
 
 export NVM_DIR="$HOME/.nvm"
 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
 [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
+
+if [ ! -f /usr/local/bin/nvim ]; then
+	export EDITOR=nano
+else
+	export EDITOR=nvim
+fi
+
+export EDITOR
+
+
+
+#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
+export SDKMAN_DIR="$HOME/.sdkman"
+[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"