feat!: change from Nvchad to Lazyvim
This commit is contained in:
parent
04fd30ca73
commit
388f038d26
37
README.md
37
README.md
@ -4,12 +4,15 @@
|
|||||||
 [<kbd> <br> Installation <br> </kbd>](#installation) 
|
 [<kbd> <br> Installation <br> </kbd>](#installation) 
|
||||||
 [<kbd> <br> Usage <br> </kbd>](#usage) 
|
 [<kbd> <br> Usage <br> </kbd>](#usage) 
|
||||||
 [<kbd> <br> Troubleshooting <br> </kbd>](#troubleshooting) 
|
 [<kbd> <br> Troubleshooting <br> </kbd>](#troubleshooting) 
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## About this repository
|
## About this repository
|
||||||
|
|
||||||
It contains all my configuration files (managed by [Chezmoi](https://www.chezmoi.io/)) and the script permitting to install my configuration on any Arch-based Linux distribution or any Linux distribution (as long as you can install [that](#prerequisites)).
|
It contains all my configuration files (managed by [Chezmoi](https://www.chezmoi.io/)) and the script permitting to install my configuration on any Arch-based Linux distribution or any Linux distribution (as long as you can install [that](#prerequisites)).
|
||||||
|
|
||||||
**Overview :**
|
**Overview :**
|
||||||
|
|
||||||
- [💻 OS]():
|
- [💻 OS]():
|
||||||
- [Arch Linux 💥](https://archlinux.org/)
|
- [Arch Linux 💥](https://archlinux.org/)
|
||||||
- [🪟 Windows Manager]():
|
- [🪟 Windows Manager]():
|
||||||
@ -35,22 +38,29 @@ Check the `utils/packages` file to see all the packages installed by the script.
|
|||||||
<hr style="height:10px">
|
<hr style="height:10px">
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
`Chezmoi`, `pacman` and `sudo` are necessary, be sure to have them install and configure!
|
`Chezmoi`, `pacman` and `sudo` are necessary, be sure to have them install and configure!
|
||||||
`Git` and `age` might be useful to have install.
|
`Git` and `age` might be useful to have install.
|
||||||
You may want to install the appropriate [driver](https://wiki.archlinux.org/title/NVIDIA) if you have an NVIDIA GPU.
|
You may want to install the appropriate [driver](https://wiki.archlinux.org/title/NVIDIA) if you have an NVIDIA GPU.
|
||||||
|
|
||||||
### Installation guide
|
### Installation guide
|
||||||
|
|
||||||
Initialize the `chezmoi` repository with the following command :
|
Initialize the `chezmoi` repository with the following command :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chezmoi init https://gitea.hexasec.io/tombdf/.dotfiles.git
|
chezmoi init https://gitea.hexasec.io/tombdf/.dotfiles.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Start the installation script with the following command :
|
Start the installation script with the following command :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chezmoi cd && ./install.sh
|
chezmoi cd && ./install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Finishing the configuration
|
### Finishing the configuration
|
||||||
|
|
||||||
The script will end by itself. I recommend you to restart your computer.
|
The script will end by itself. I recommend you to restart your computer.
|
||||||
After restarting and opening the terminal, Fisher will install all the plugins.
|
After restarting and opening the terminal, Fisher will install all the plugins.
|
||||||
If you have access to Github Copilot, I recommend you to log in neovim with the `Copilot auth` command.
|
If you have access to Github Copilot, I recommend you to log in neovim with the `Copilot auth` command.
|
||||||
@ -62,12 +72,15 @@ PS: Don't forget to check the log file
|
|||||||
<hr style="height:10px">
|
<hr style="height:10px">
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
The following sections will resume what usage you can have of different commands, text editors or terminal emulator.
|
The following sections will resume what usage you can have of different commands, text editors or terminal emulator.
|
||||||
|
|
||||||
### Commands
|
### Commands
|
||||||
|
|
||||||
With Zsh and Zinit, a lot of commands will be installed. They're very useful and powerful so it might be a good idea to learn what they are.
|
With Zsh and Zinit, a lot of commands will be installed. They're very useful and powerful so it might be a good idea to learn what they are.
|
||||||
|
|
||||||
#### Zoxide
|
#### Zoxide
|
||||||
|
|
||||||
**Commands** : `z` | `zi`
|
**Commands** : `z` | `zi`
|
||||||
**Replaced by** : `cd` | `cdi`
|
**Replaced by** : `cd` | `cdi`
|
||||||
[Github page](https://github.com/ajeetdsouza/zoxide)
|
[Github page](https://github.com/ajeetdsouza/zoxide)
|
||||||
@ -82,6 +95,7 @@ Usage of the command : `tldr zoxide`
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Lsd
|
#### Lsd
|
||||||
|
|
||||||
**Command** : `lsd`
|
**Command** : `lsd`
|
||||||
**Aliased by** : `ls` | `ll`
|
**Aliased by** : `ls` | `ll`
|
||||||
[Github page](https://github.com/lsd-rs/lsd-rs)
|
[Github page](https://github.com/lsd-rs/lsd-rs)
|
||||||
@ -94,6 +108,7 @@ Usage of the command : `tldr lsd`
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Rip
|
#### Rip
|
||||||
|
|
||||||
**Command** : `rip`
|
**Command** : `rip`
|
||||||
**Aliased by** : `rm`
|
**Aliased by** : `rm`
|
||||||
[Github page](https://github.com/nivekuil/rip)
|
[Github page](https://github.com/nivekuil/rip)
|
||||||
@ -106,6 +121,7 @@ Usage of the command : `tldr rip`
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Bat
|
#### Bat
|
||||||
|
|
||||||
**Command** : `bat`
|
**Command** : `bat`
|
||||||
**Aliased by** : `cat`
|
**Aliased by** : `cat`
|
||||||
[Github page](https://github.com/sharkdp/bat)
|
[Github page](https://github.com/sharkdp/bat)
|
||||||
@ -118,6 +134,7 @@ Usage of the command : `tldr bat`
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Ripgrep
|
#### Ripgrep
|
||||||
|
|
||||||
**Command** : `rg`
|
**Command** : `rg`
|
||||||
**Aliased by** : `grep`
|
**Aliased by** : `grep`
|
||||||
[Github page](https://github.com/BurntSushi/ripgrep)
|
[Github page](https://github.com/BurntSushi/ripgrep)
|
||||||
@ -129,6 +146,7 @@ Usage of the command : `tldr rg`
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Fd
|
#### Fd
|
||||||
|
|
||||||
**Command** : `fd`
|
**Command** : `fd`
|
||||||
**Aliased by** : `find`
|
**Aliased by** : `find`
|
||||||
[Github page](https://github.com/sharkdp/fd)
|
[Github page](https://github.com/sharkdp/fd)
|
||||||
@ -141,6 +159,7 @@ Usage of the command : `tldr fd`
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Sd
|
#### Sd
|
||||||
|
|
||||||
**Command** : `sd`
|
**Command** : `sd`
|
||||||
**Aliased by** : `sed`
|
**Aliased by** : `sed`
|
||||||
[Github page](https://github.com/chmln/sd)
|
[Github page](https://github.com/chmln/sd)
|
||||||
@ -152,6 +171,7 @@ Usage of the command : `tldr sd`
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Topgrade
|
#### Topgrade
|
||||||
|
|
||||||
**Command** : `topgrade`
|
**Command** : `topgrade`
|
||||||
[Github page](https://github.com/topgrade-rs/topgrade)
|
[Github page](https://github.com/topgrade-rs/topgrade)
|
||||||
|
|
||||||
@ -162,6 +182,7 @@ Usage of the command : `tldr topgrade`
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Tealdeer
|
#### Tealdeer
|
||||||
|
|
||||||
**Command** : `tldr`
|
**Command** : `tldr`
|
||||||
[Github page](https://github.com/dbrgn/tealdeer)
|
[Github page](https://github.com/dbrgn/tealdeer)
|
||||||
|
|
||||||
@ -169,9 +190,11 @@ Tealdeer is a faster TLDR. It shows you pages written by community on different
|
|||||||
The pages shows different common and useful uses of commands.
|
The pages shows different common and useful uses of commands.
|
||||||
|
|
||||||
### Text editors
|
### Text editors
|
||||||
|
|
||||||
Differents text editors are available with my config. They're very powerful if you know how to use them and if you know the right keyboard shortcuts.
|
Differents text editors are available with my config. They're very powerful if you know how to use them and if you know the right keyboard shortcuts.
|
||||||
|
|
||||||
#### Vim
|
#### Vim
|
||||||
|
|
||||||
**Command** : `vim`
|
**Command** : `vim`
|
||||||
**Replaced by** : `vi`
|
**Replaced by** : `vi`
|
||||||
**Leader** : `,`
|
**Leader** : `,`
|
||||||
@ -186,6 +209,7 @@ To see all the mappings, check the `.vimrc` config file.
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
#### Neovim with NvChad
|
#### Neovim with NvChad
|
||||||
|
|
||||||
**Command** : `nvim`
|
**Command** : `nvim`
|
||||||
**Aliased by** : `vim`
|
**Aliased by** : `vim`
|
||||||
**Leader** : `,`
|
**Leader** : `,`
|
||||||
@ -199,25 +223,30 @@ Type the `Copilot` command and type `tab` to see all the command available to us
|
|||||||
To see all the mappings, check the `mappings.lua` file in `.config/nvim/lua/`. To see all the plugins, check the `plugins.lua` file in `.config/nvim/lua/plugins`.
|
To see all the mappings, check the `mappings.lua` file in `.config/nvim/lua/`. To see all the plugins, check the `plugins.lua` file in `.config/nvim/lua/plugins`.
|
||||||
|
|
||||||
### Terminal emulator
|
### Terminal emulator
|
||||||
|
|
||||||
Kitty is the terminal emulator use in this config.
|
Kitty is the terminal emulator use in this config.
|
||||||
The leader key is Ctrl+Shift, here is a list of useful mappings :
|
The leader key is Ctrl+Shift, here is a list of useful mappings :
|
||||||
* `<leader>t` : Create a new tab.
|
|
||||||
* `<leader>q` : Close a tab.
|
- `<leader>t` : Create a new tab.
|
||||||
* `<leader><Enter>` : Split a tab.
|
- `<leader>q` : Close a tab.
|
||||||
* `<leader><Directional-arrow>` : Move between the different tab.
|
- `<leader><Enter>` : Split a tab.
|
||||||
|
- `<leader><Directional-arrow>` : Move between the different tab.
|
||||||
|
|
||||||
Check the `kitty.conf` file in `.config/kitty/` to see all the possibility offered by Kitty.
|
Check the `kitty.conf` file in `.config/kitty/` to see all the possibility offered by Kitty.
|
||||||
|
|
||||||
<hr style="height:10px">
|
<hr style="height:10px">
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
Before doing anything, verify that all the packages listed [here](#necessary-packages) are installed with the latest stable version.
|
Before doing anything, verify that all the packages listed [here](#necessary-packages) are installed with the latest stable version.
|
||||||
|
|
||||||
### Fish
|
### Fish
|
||||||
|
|
||||||
If something went wrong when sourcing the config file, it might be that fish_inclusion was not delete preventing, when sourcing the file again, the downloading or the call of certains plugins.
|
If something went wrong when sourcing the config file, it might be that fish_inclusion was not delete preventing, when sourcing the file again, the downloading or the call of certains plugins.
|
||||||
To fix that, you just have to run manually the command to reset the variable : set -e fish_inclusion
|
To fix that, you just have to run manually the command to reset the variable : set -e fish_inclusion
|
||||||
|
|
||||||
### Neovim
|
### Neovim
|
||||||
|
|
||||||
If NvChad seems not to be installed, be sure to have the latest version of Neovim installed.
|
If NvChad seems not to be installed, be sure to have the latest version of Neovim installed.
|
||||||
For any problem with a plugin, use the `checkhealth` command and see if anything wrong with the plugin is mentioned.
|
For any problem with a plugin, use the `checkhealth` command and see if anything wrong with the plugin is mentioned.
|
||||||
If you get an error message like this : **"Client 1 quit with code 1"**, it might mean that a package is missing for Mason to work correctly.
|
If you get an error message like this : **"Client 1 quit with code 1"**, it might mean that a package is missing for Mason to work correctly.
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# vim:fileencoding=utf-8:foldmethod=marker
|
||||||
########################################################################################################
|
########################################################################################################
|
||||||
#
|
#
|
||||||
# ██╗ ██╗██╗████████╗████████╗██╗ ██╗ ██████╗ ██████╗ ███╗ ██╗███████╗
|
# ██╗ ██╗██╗████████╗████████╗██╗ ██╗ ██████╗ ██████╗ ███╗ ██╗███████╗
|
||||||
@ -9,6 +10,7 @@
|
|||||||
#
|
#
|
||||||
########################################################################################################
|
########################################################################################################
|
||||||
|
|
||||||
|
|
||||||
#: Fonts {{{
|
#: Fonts {{{
|
||||||
|
|
||||||
#: kitty has very powerful font management. You can configure
|
#: kitty has very powerful font management. You can configure
|
||||||
@ -316,7 +318,7 @@ cursor_stop_blinking_after 15.0
|
|||||||
#: Stop blinking cursor after the specified number of seconds of
|
#: Stop blinking cursor after the specified number of seconds of
|
||||||
#: keyboard inactivity. Set to zero to never stop blinking.
|
#: keyboard inactivity. Set to zero to never stop blinking.
|
||||||
|
|
||||||
# cursor_trail 0
|
cursor_trail 0
|
||||||
|
|
||||||
#: Set this to a value larger than zero to enable a "cursor trail"
|
#: Set this to a value larger than zero to enable a "cursor trail"
|
||||||
#: animation. This is an animation that shows a "trail" following the
|
#: animation. This is an animation that shows a "trail" following the
|
||||||
@ -332,7 +334,7 @@ cursor_stop_blinking_after 15.0
|
|||||||
#: cursor_trail_start_threshold to control when a cursor trail is
|
#: cursor_trail_start_threshold to control when a cursor trail is
|
||||||
#: started.
|
#: started.
|
||||||
|
|
||||||
# cursor_trail_decay 0.1 0.4
|
cursor_trail_decay 0.1 0.4
|
||||||
|
|
||||||
#: Controls the decay times for the cursor trail effect when the
|
#: Controls the decay times for the cursor trail effect when the
|
||||||
#: cursor_trail is enabled. This option accepts two positive float
|
#: cursor_trail is enabled. This option accepts two positive float
|
||||||
@ -344,7 +346,7 @@ cursor_stop_blinking_after 15.0
|
|||||||
#: trail. Adjust these values to control how quickly the cursor trail
|
#: trail. Adjust these values to control how quickly the cursor trail
|
||||||
#: fades away.
|
#: fades away.
|
||||||
|
|
||||||
# cursor_trail_start_threshold 2
|
cursor_trail_start_threshold 2
|
||||||
|
|
||||||
#: Set the distance threshold for starting the cursor trail. This
|
#: Set the distance threshold for starting the cursor trail. This
|
||||||
#: option accepts a positive integer value that represents the minimum
|
#: option accepts a positive integer value that represents the minimum
|
||||||
@ -1070,7 +1072,7 @@ tab_bar_margin_height 0.0 0.0
|
|||||||
#: The second number is the margin between the tab bar and the
|
#: The second number is the margin between the tab bar and the
|
||||||
#: contents of the current tab.
|
#: contents of the current tab.
|
||||||
|
|
||||||
tab_bar_style fade
|
tab_bar_style custom
|
||||||
|
|
||||||
#: The tab bar style, can be one of:
|
#: The tab bar style, can be one of:
|
||||||
|
|
||||||
@ -2463,6 +2465,8 @@ map kitty_mod+e open_url_with_hints
|
|||||||
|
|
||||||
#: Miscellaneous {{{
|
#: Miscellaneous {{{
|
||||||
|
|
||||||
|
map kitty_mod+g kitten gattino/gattino.py
|
||||||
|
|
||||||
#: Show documentation
|
#: Show documentation
|
||||||
|
|
||||||
map kitty_mod+f1 show_kitty_doc overview
|
map kitty_mod+f1 show_kitty_doc overview
|
||||||
|
|||||||
15
private_dot_config/nvim/dot_neoconf.json
Normal file
15
private_dot_config/nvim/dot_neoconf.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"neodev": {
|
||||||
|
"library": {
|
||||||
|
"enabled": true,
|
||||||
|
"plugins": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neoconf": {
|
||||||
|
"plugins": {
|
||||||
|
"lua_ls": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,37 +1,10 @@
|
|||||||
vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/"
|
vim.g.base46_cache = vim.fn.stdpath("data") .. "/base46_cache/"
|
||||||
vim.g.mapleader = ","
|
|
||||||
|
|
||||||
-- bootstrap lazy and all plugins
|
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||||
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
require("config.lazy")
|
||||||
|
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
-- dofile(vim.g.base46_cache .. "defaults")
|
||||||
local repo = "https://github.com/folke/lazy.nvim.git"
|
|
||||||
vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
-- for _, v in ipairs(vim.fn.readdir(vim.g.base46_cache)) do
|
||||||
|
-- dofile(vim.g.base46_cache .. v)
|
||||||
local lazy_config = require "configs.lazy"
|
-- end
|
||||||
|
|
||||||
-- load plugins
|
|
||||||
require("lazy").setup({
|
|
||||||
{
|
|
||||||
"NvChad/NvChad",
|
|
||||||
lazy = false,
|
|
||||||
branch = "v2.5",
|
|
||||||
import = "nvchad.plugins",
|
|
||||||
},
|
|
||||||
|
|
||||||
{ import = "plugins" },
|
|
||||||
}, lazy_config)
|
|
||||||
|
|
||||||
-- load theme
|
|
||||||
dofile(vim.g.base46_cache .. "defaults")
|
|
||||||
dofile(vim.g.base46_cache .. "statusline")
|
|
||||||
|
|
||||||
require "options"
|
|
||||||
require "nvchad.autocmds"
|
|
||||||
|
|
||||||
vim.schedule(function()
|
|
||||||
require "mappings"
|
|
||||||
end)
|
|
||||||
|
|||||||
40
private_dot_config/nvim/lazyvim.json
Normal file
40
private_dot_config/nvim/lazyvim.json
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"extras": [
|
||||||
|
"lazyvim.plugins.extras.ai.copilot",
|
||||||
|
"lazyvim.plugins.extras.ai.copilot-chat",
|
||||||
|
"lazyvim.plugins.extras.coding.luasnip",
|
||||||
|
"lazyvim.plugins.extras.coding.mini-comment",
|
||||||
|
"lazyvim.plugins.extras.coding.mini-surround",
|
||||||
|
"lazyvim.plugins.extras.coding.neogen",
|
||||||
|
"lazyvim.plugins.extras.coding.yanky",
|
||||||
|
"lazyvim.plugins.extras.dap.core",
|
||||||
|
"lazyvim.plugins.extras.dap.nlua",
|
||||||
|
"lazyvim.plugins.extras.editor.dial",
|
||||||
|
"lazyvim.plugins.extras.editor.fzf",
|
||||||
|
"lazyvim.plugins.extras.editor.inc-rename",
|
||||||
|
"lazyvim.plugins.extras.formatting.black",
|
||||||
|
"lazyvim.plugins.extras.lang.clangd",
|
||||||
|
"lazyvim.plugins.extras.lang.docker",
|
||||||
|
"lazyvim.plugins.extras.lang.git",
|
||||||
|
"lazyvim.plugins.extras.lang.haskell",
|
||||||
|
"lazyvim.plugins.extras.lang.json",
|
||||||
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
|
"lazyvim.plugins.extras.lang.nix",
|
||||||
|
"lazyvim.plugins.extras.lang.python",
|
||||||
|
"lazyvim.plugins.extras.lang.sql",
|
||||||
|
"lazyvim.plugins.extras.lang.toml",
|
||||||
|
"lazyvim.plugins.extras.ui.edgy",
|
||||||
|
"lazyvim.plugins.extras.ui.smear-cursor",
|
||||||
|
"lazyvim.plugins.extras.ui.treesitter-context",
|
||||||
|
"lazyvim.plugins.extras.util.chezmoi",
|
||||||
|
"lazyvim.plugins.extras.util.dot",
|
||||||
|
"lazyvim.plugins.extras.util.gitui",
|
||||||
|
"lazyvim.plugins.extras.util.mini-hipatterns",
|
||||||
|
"lazyvim.plugins.extras.util.octo",
|
||||||
|
"lazyvim.plugins.extras.util.project"
|
||||||
|
],
|
||||||
|
"news": {
|
||||||
|
"NEWS.md": "10960"
|
||||||
|
},
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
@ -1,79 +0,0 @@
|
|||||||
local autocmd = vim.api.nvim_create_autocmd
|
|
||||||
|
|
||||||
-- dont list quickfix buffers
|
|
||||||
autocmd("FileType", {
|
|
||||||
pattern = "qf",
|
|
||||||
callback = function()
|
|
||||||
vim.opt_local.buflisted = false
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- reload some chadrc options on-save
|
|
||||||
autocmd("BufWritePost", {
|
|
||||||
pattern = vim.tbl_map(function(path)
|
|
||||||
return vim.fs.normalize(vim.loop.fs_realpath(path))
|
|
||||||
end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/**/*.lua", true, true, true)),
|
|
||||||
group = vim.api.nvim_create_augroup("ReloadNvChad", {}),
|
|
||||||
|
|
||||||
callback = function(opts)
|
|
||||||
local fp = vim.fn.fnamemodify(vim.fs.normalize(vim.api.nvim_buf_get_name(opts.buf)), ":r") --[[@as string]]
|
|
||||||
local app_name = vim.env.NVIM_APPNAME and vim.env.NVIM_APPNAME or "nvim"
|
|
||||||
local module = string.gsub(fp, "^.*/" .. app_name .. "/lua/", ""):gsub("/", ".")
|
|
||||||
|
|
||||||
require("plenary.reload").reload_module "nvconfig"
|
|
||||||
require("plenary.reload").reload_module "chadrc"
|
|
||||||
require("plenary.reload").reload_module "base46"
|
|
||||||
require("plenary.reload").reload_module(module)
|
|
||||||
|
|
||||||
local config = require "nvconfig"
|
|
||||||
|
|
||||||
-- statusline
|
|
||||||
require("plenary.reload").reload_module "nvchad.stl.utils"
|
|
||||||
require("plenary.reload").reload_module("nvchad.stl." .. config.ui.statusline.theme)
|
|
||||||
vim.opt.statusline = "%!v:lua.require('nvchad.stl." .. config.ui.statusline.theme .. "')()"
|
|
||||||
|
|
||||||
-- tabufline
|
|
||||||
if config.ui.tabufline.enabled then
|
|
||||||
require("plenary.reload").reload_module "nvchad.tabufline.modules"
|
|
||||||
vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules')()"
|
|
||||||
end
|
|
||||||
|
|
||||||
require("base46").load_all_highlights()
|
|
||||||
-- vim.cmd("redraw!")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- user event that loads after UIEnter + only if file buf is there
|
|
||||||
vim.api.nvim_create_autocmd({ "UIEnter", "BufReadPost", "BufNewFile" }, {
|
|
||||||
group = vim.api.nvim_create_augroup("NvFilePost", { clear = true }),
|
|
||||||
callback = function(args)
|
|
||||||
local file = vim.api.nvim_buf_get_name(args.buf)
|
|
||||||
local buftype = vim.api.nvim_buf_get_option(args.buf, "buftype")
|
|
||||||
|
|
||||||
if not vim.g.ui_entered and args.event == "UIEnter" then
|
|
||||||
vim.g.ui_entered = true
|
|
||||||
end
|
|
||||||
|
|
||||||
if file ~= "" and buftype ~= "nofile" and vim.g.ui_entered then
|
|
||||||
vim.api.nvim_exec_autocmds("User", { pattern = "FilePost", modeline = false })
|
|
||||||
vim.api.nvim_del_augroup_by_name "NvFilePost"
|
|
||||||
|
|
||||||
vim.schedule(function()
|
|
||||||
vim.api.nvim_exec_autocmds("FileType", {})
|
|
||||||
|
|
||||||
if vim.g.editorconfig then
|
|
||||||
require("editorconfig").config(args.buf)
|
|
||||||
end
|
|
||||||
end, 0)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- fix lspsaga codeaction causing buffer issues
|
|
||||||
vim.api.nvim_create_autocmd("BufAdd", {
|
|
||||||
callback = function(args)
|
|
||||||
if vim.bo[args.buf].buflisted then
|
|
||||||
print(args.buf)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@ -1,19 +1,32 @@
|
|||||||
--------------------------------------------------------------------------
|
|
||||||
--
|
|
||||||
-- ██████╗██╗ ██╗ █████╗ ██████╗ ██████╗ ██████╗
|
|
||||||
-- ██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗██╔════╝
|
|
||||||
-- ██║ ███████║███████║██║ ██║██████╔╝██║
|
|
||||||
-- ██║ ██╔══██║██╔══██║██║ ██║██╔══██╗██║
|
|
||||||
-- ╚██████╗██║ ██║██║ ██║██████╔╝██║ ██║╚██████╗
|
|
||||||
-- ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝
|
|
||||||
--
|
|
||||||
--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
---@type ChadrcConfig
|
|
||||||
local options = {
|
local options = {
|
||||||
|
|
||||||
|
base46 = {
|
||||||
|
theme = "gruvbox", -- default theme
|
||||||
|
hl_add = {},
|
||||||
|
hl_override = {
|
||||||
|
Comment = { fg = "#928374" },
|
||||||
|
["@comment"] = { fg = "#928374" },
|
||||||
|
LineNr = { fg = "#928374" },
|
||||||
|
Directory = { fg = "#b8bb26" },
|
||||||
|
-- Special = { fg = "#fe8019" },
|
||||||
|
},
|
||||||
|
integrations = { "cmp", "dap", "edgy", "leap", "lsp", "telescope", "treesitter", "trouble", "whichkey" },
|
||||||
|
changed_themes = {},
|
||||||
|
transparency = true,
|
||||||
|
theme_toggle = { "gruvbox" },
|
||||||
|
},
|
||||||
|
|
||||||
ui = {
|
ui = {
|
||||||
------------------------------- nvchad_ui modules -----------------------------
|
cmp = {
|
||||||
|
style = "default", -- default/flat_light/flat_dark/atom/atom_colored
|
||||||
|
format_colors = {
|
||||||
|
tailwind = false, -- will work for css lsp too
|
||||||
|
icon = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
telescope = { style = "bordered" }, -- borderless / bordered
|
||||||
|
|
||||||
statusline = {
|
statusline = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
theme = "default", -- default/vscode/vscode_colored/minimal
|
theme = "default", -- default/vscode/vscode_colored/minimal
|
||||||
@ -26,47 +39,38 @@ local options = {
|
|||||||
|
|
||||||
-- lazyload it when there are 1+ buffers
|
-- lazyload it when there are 1+ buffers
|
||||||
tabufline = {
|
tabufline = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
lazyload = true,
|
lazyload = true,
|
||||||
order = { "treeOffset", "buffers", "tabs", "btns" },
|
order = { "treeOffset", "buffers", "tabs", "btns" },
|
||||||
modules = nil,
|
modules = nil,
|
||||||
},
|
bufwidth = 21,
|
||||||
|
|
||||||
telescope = { style = "bordered" }, -- borderless / bordered
|
|
||||||
|
|
||||||
cmp = {
|
|
||||||
icons = true,
|
|
||||||
icons_left = false, -- only for non-atom styles!
|
|
||||||
lspkind_text = true,
|
|
||||||
style = "default", -- default/flat_light/flat_dark/atom/atom_colored
|
|
||||||
format_colors = {
|
|
||||||
tailwind = false, -- will work for css lsp too
|
|
||||||
icon = "",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
nvdash = {
|
nvdash = {
|
||||||
load_on_startup = true,
|
load_on_startup = false,
|
||||||
header = {
|
header = {
|
||||||
" I use ",
|
" ",
|
||||||
" ██████ █████ █████ █████ ███ ",
|
" ▄▄ ▄ ▄▄▄▄▄▄▄ ",
|
||||||
" ░░██████ ░░███ ░░███ ░░███ ░░░ ",
|
" ▄▀███▄ ▄██ █████▀ ",
|
||||||
" ░███░███ ░███ ██████ ██████ ░███ ░███ ████ █████████████ ",
|
" ██▄▀███▄ ███ ",
|
||||||
" ░███░░███░███ ███░░███ ███░░███ ░███ ░███ ░░███ ░░███░░███░░███ ",
|
" ███ ▀███▄ ███ ",
|
||||||
" ░███ ░░██████ ░███████ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███ ",
|
" ███ ▀██ ███ ",
|
||||||
" ░███ ░░█████ ░███░░░ ░███ ░███ ░░░█████░ ░███ ░███ ░███ ░███ ",
|
" ███ ▀ ███ ",
|
||||||
" █████ ░░█████░░██████ ░░██████ ░░███ █████ █████░███ █████ ",
|
" ▀██ █████▄▀█▀▄██████▄ ",
|
||||||
" ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░ ",
|
" ▀ ▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ",
|
||||||
" btw ",
|
" ",
|
||||||
|
" Powered By eovim ",
|
||||||
|
" ",
|
||||||
},
|
},
|
||||||
|
|
||||||
buttons = {
|
buttons = {
|
||||||
{ txt = " Find file", keys = ", f f", cmd = "Telescope find_files" },
|
{ txt = " Find File", keys = "ff", cmd = "Telescope find_files" },
|
||||||
{ txt = " Recent Files", keys = ", f o", cmd = "Telescope oldfiles" },
|
{ txt = " Recent Files", keys = "fo", cmd = "Telescope oldfiles" },
|
||||||
{ txt = " Find Word", keys = ", f w", cmd = "Telescope live_grep" },
|
{ txt = " Find Word", keys = "fw", cmd = "Telescope live_grep" },
|
||||||
{ txt = " Bookmarks", keys = ", m a", cmd = "Telescope marks" },
|
{ txt = " Themes", keys = "th", cmd = ":lua require('nvchad.themes').open()" },
|
||||||
{ txt = " Themes", keys = ", t h", cmd = "Telescope themes" },
|
{ txt = " Mappings", keys = "ch", cmd = "NvCheatsheet" },
|
||||||
{ txt = " Mappings", keys = ", c h", cmd = "NvCheatsheet" },
|
|
||||||
{ txt = "─", hl = "NvDashFooter", no_gap = true, rep = true },
|
{ txt = "─", hl = "NvDashFooter", no_gap = true, rep = true },
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -96,46 +100,14 @@ local options = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
lsp = {
|
lsp = { signature = false },
|
||||||
signature = true,
|
|
||||||
semantic_tokens = false,
|
cheatsheet = {
|
||||||
|
theme = "grid", -- simple/grid
|
||||||
|
excluded_groups = { "terminal (t)", "autopairs", "Nvim", "Opens" }, -- can add group name or with mode
|
||||||
},
|
},
|
||||||
|
|
||||||
cheatsheet = { theme = "grid" }, -- simple/grid
|
mason = { pkgs = {}, skip = {} },
|
||||||
|
|
||||||
base46 = {
|
|
||||||
integrations = {
|
|
||||||
"codeactionmenu",
|
|
||||||
"cmp",
|
|
||||||
"dap",
|
|
||||||
"defaults",
|
|
||||||
"devicons",
|
|
||||||
"git",
|
|
||||||
"lsp",
|
|
||||||
"lspsaga",
|
|
||||||
"markview",
|
|
||||||
"mason",
|
|
||||||
"notify",
|
|
||||||
"nvcheatsheet",
|
|
||||||
"nvimtree",
|
|
||||||
"statusline",
|
|
||||||
"syntax",
|
|
||||||
"treesitter",
|
|
||||||
"trouble",
|
|
||||||
"tbline",
|
|
||||||
"telescope",
|
|
||||||
"whichkey",
|
|
||||||
},
|
|
||||||
|
|
||||||
theme = "gruvbox", -- default theme
|
|
||||||
|
|
||||||
hl_override = {
|
|
||||||
Comment = { fg = "#928374" },
|
|
||||||
["@comment"] = { fg = "#928374" },
|
|
||||||
LineNr = { fg = "#928374" },
|
|
||||||
},
|
|
||||||
transparency = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
colorify = {
|
colorify = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
@ -143,7 +115,6 @@ local options = {
|
|||||||
virt_text = " ",
|
virt_text = " ",
|
||||||
highlight = { hex = true, lspvars = true },
|
highlight = { hex = true, lspvars = true },
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local status, chadrc = pcall(require, "chadrc")
|
local status, chadrc = pcall(require, "chadrc")
|
||||||
|
|||||||
19
private_dot_config/nvim/lua/config/autocmds.lua
Normal file
19
private_dot_config/nvim/lua/config/autocmds.lua
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
|
--
|
||||||
|
-- Add any additional autocmds here
|
||||||
|
-- with `vim.api.nvim_create_autocmd`
|
||||||
|
--
|
||||||
|
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
||||||
|
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
||||||
|
|
||||||
|
-- Window navigation for dadbod-ui
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "dbui", -- for dadbod-ui buffers
|
||||||
|
callback = function()
|
||||||
|
vim.keymap.set("n", "<C-j>", "<C-w>h", { buffer = true, desc = "Go to left window" })
|
||||||
|
vim.keymap.set("n", "<C-k>", "<C-w>j", { buffer = true, desc = "Go to lower window" })
|
||||||
|
vim.keymap.set("n", "<C-l>", "<C-w>k", { buffer = true, desc = "Go to upper window" })
|
||||||
|
vim.keymap.set("n", "<C-m>", "<C-w>l", { buffer = true, desc = "Go to right window" })
|
||||||
|
end,
|
||||||
|
})
|
||||||
80
private_dot_config/nvim/lua/config/keymaps.lua
Normal file
80
private_dot_config/nvim/lua/config/keymaps.lua
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
-- Keymaps are automatically loaded on the VeryLazy event
|
||||||
|
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||||
|
-- Add any additional keymaps here
|
||||||
|
|
||||||
|
local map = vim.keymap.set
|
||||||
|
|
||||||
|
-- Custom movement keys (JKLM instead of HJKL)
|
||||||
|
map({ "n", "v", "o" }, "j", "h", { desc = "Move left" })
|
||||||
|
map({ "n", "v", "o" }, "k", "v:count == 0 ? 'gj' : 'j'", { desc = "Move down", expr = true, silent = true })
|
||||||
|
map({ "n", "v" }, "<Down>", "v:count == 0 ? 'gj' : 'j'", { desc = "Move down", expr = true, silent = true })
|
||||||
|
map({ "n", "v", "o" }, "l", "v:count == 0 ? 'gk' : 'k'", { desc = "Move up", expr = true, silent = true })
|
||||||
|
map({ "n", "v" }, "<Up>", "v:count == 0 ? 'gk' : 'k'", { desc = "Move up", expr = true, silent = true })
|
||||||
|
map({ "n", "v", "o" }, "m", "l", { desc = "Move right" })
|
||||||
|
|
||||||
|
map("n", "§", "m", { desc = "Set a mark" })
|
||||||
|
|
||||||
|
-- Window navigation
|
||||||
|
map("n", "<C-j>", "<C-w>h", { desc = "Go to left window" })
|
||||||
|
map("n", "<C-k>", "<C-w>j", { desc = "Go to lower window" })
|
||||||
|
map("n", "<C-l>", "<C-w>k", { desc = "Go to upper window" })
|
||||||
|
map("n", "<C-m>", "<C-w>l", { desc = "Go to right window" })
|
||||||
|
-- for dadbod-ui buffers, see autocmds.lua
|
||||||
|
|
||||||
|
-- Move Lines
|
||||||
|
map("n", "<A-k>", "<cmd>execute 'move .+' . v:count1<cr>==", { desc = "Move Down" })
|
||||||
|
map("n", "<A-l>", "<cmd>execute 'move .-' . (v:count1 + 1)<cr>==", { desc = "Move Up" })
|
||||||
|
map("i", "<A-k>", "<esc><cmd>m .+1<cr>==gi", { desc = "Move Down" })
|
||||||
|
map("i", "<A-l>", "<esc><cmd>m .-2<cr>==gi", { desc = "Move Up" })
|
||||||
|
map("v", "<A-k>", ":<C-u>execute \"'<,'>move '>+\" . v:count1<cr>gv=gv", { desc = "Move Down" })
|
||||||
|
map("v", "<A-l>", ":<C-u>execute \"'<,'>move '<-\" . (v:count1 + 1)<cr>gv=gv", { desc = "Move Up" })
|
||||||
|
|
||||||
|
-- Better line creation
|
||||||
|
-- map("n", "o", "o<ESC>", { desc = "Create line below and stay in normal mode" })
|
||||||
|
-- map("n", "O", "O<ESC>", { desc = "Create line above and stay in normal mode" })
|
||||||
|
|
||||||
|
map("n", "n", "nzz")
|
||||||
|
map("n", "N", "Nzz")
|
||||||
|
|
||||||
|
-- Insert mode mappings
|
||||||
|
map("i", "jj", "<ESC>", { desc = "Exit insert mode" })
|
||||||
|
map("i", "<C-d>", "<ESC>ddi", { desc = "Delete line" })
|
||||||
|
map("i", "<C-b>", "<ESC>^i", { desc = "Beginning of line" })
|
||||||
|
map("i", "<C-e>", "<End>", { desc = "End of line" })
|
||||||
|
|
||||||
|
-- Space as command key
|
||||||
|
-- map("n", "<Space>", ":", { desc = "Enter command mode" })
|
||||||
|
|
||||||
|
-- Move between buffers
|
||||||
|
map("n", "<S-TAB>", "<cmd>bprevious<cr>", { desc = "Prev Buffer" })
|
||||||
|
map("n", "<TAB>", "<cmd>bnext<cr>", { desc = "Next Buffer" })
|
||||||
|
|
||||||
|
-- map("n", "<leader>h", function()
|
||||||
|
-- require("nvchad.term").new({ pos = "sp", size = 0.4 })
|
||||||
|
-- end, { desc = "Terminal New horizontal term" })
|
||||||
|
|
||||||
|
map("t", "<C-x>", "<C-\\><C-N>", { desc = "Terminal Escape terminal mode" })
|
||||||
|
|
||||||
|
-- Keyboard users
|
||||||
|
vim.keymap.set("n", "<C-t>", function()
|
||||||
|
require("menu").open("default")
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
-- mouse users + nvimtree users!
|
||||||
|
vim.keymap.set({ "n", "v" }, "<RightMouse>", function()
|
||||||
|
require("menu.utils").delete_old_menus()
|
||||||
|
|
||||||
|
vim.cmd.exec('"normal! \\<RightMouse>"')
|
||||||
|
|
||||||
|
-- clicked buf
|
||||||
|
local buf = vim.api.nvim_win_get_buf(vim.fn.getmousepos().winid)
|
||||||
|
local options = vim.bo[buf].ft == "NvimTree" and "nvimtree" or "default"
|
||||||
|
|
||||||
|
require("menu").open(options, { mouse = true })
|
||||||
|
end, {})
|
||||||
|
|
||||||
|
local nomap = vim.keymap.del
|
||||||
|
|
||||||
|
nomap({ "n", "i", "v" }, "<A-j>")
|
||||||
|
nomap("n", "<S-h>")
|
||||||
|
nomap("n", "<S-l>")
|
||||||
53
private_dot_config/nvim/lua/config/lazy.lua
Normal file
53
private_dot_config/nvim/lua/config/lazy.lua
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- add LazyVim and import its plugins
|
||||||
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
|
-- import/override with your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
defaults = {
|
||||||
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||||
|
lazy = false,
|
||||||
|
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||||
|
-- have outdated releases, which may break your Neovim install.
|
||||||
|
version = false, -- always use the latest git commit
|
||||||
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "tokyonight", "habamax", "gruvbox" } },
|
||||||
|
checker = {
|
||||||
|
enabled = true, -- check for plugin updates periodically
|
||||||
|
notify = false, -- notify on update
|
||||||
|
}, -- automatically check for plugin updates
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
-- disable some rtp plugins
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
-- "matchit",
|
||||||
|
-- "matchparen",
|
||||||
|
-- "netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
17
private_dot_config/nvim/lua/config/options.lua
Normal file
17
private_dot_config/nvim/lua/config/options.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
|
-- Add any additional options here
|
||||||
|
|
||||||
|
-- vim.g.mapleader = ","
|
||||||
|
|
||||||
|
vim.g.lazyvim_python_lsp = "basedpyright"
|
||||||
|
|
||||||
|
vim.g.lazyvim_blink_main = true
|
||||||
|
|
||||||
|
local opt = vim.opt
|
||||||
|
|
||||||
|
opt.tabstop = 4
|
||||||
|
|
||||||
|
-- opt.relativenumber = false
|
||||||
|
|
||||||
|
-- opt.foldmethod = "marker"
|
||||||
@ -1,26 +0,0 @@
|
|||||||
local options = {
|
|
||||||
lsp_fallback = true,
|
|
||||||
|
|
||||||
formatters_by_ft = {
|
|
||||||
lua = { "stylua" },
|
|
||||||
python = { "ruff", "black" },
|
|
||||||
c = { "clang-format" },
|
|
||||||
cpp = { "clang-format" },
|
|
||||||
html = { "prettier" },
|
|
||||||
css = { "prettier" },
|
|
||||||
javascript = { "prettier" },
|
|
||||||
markdown = { "prettier" },
|
|
||||||
md = { "prettier" },
|
|
||||||
text = { "prettier" },
|
|
||||||
json = { "prettier" },
|
|
||||||
yaml = { "prettier" },
|
|
||||||
toml = { "prettier" },
|
|
||||||
},
|
|
||||||
|
|
||||||
format_on_save = {
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_fallback = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return options
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
return {
|
|
||||||
defaults = { lazy = true },
|
|
||||||
install = { colorscheme = { "nvchad" } },
|
|
||||||
|
|
||||||
ui = {
|
|
||||||
icons = {
|
|
||||||
ft = "",
|
|
||||||
lazy = " ",
|
|
||||||
loaded = "",
|
|
||||||
not_loaded = "",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
performance = {
|
|
||||||
rtp = {
|
|
||||||
disabled_plugins = {
|
|
||||||
"2html_plugin",
|
|
||||||
"tohtml",
|
|
||||||
"getscript",
|
|
||||||
"getscriptPlugin",
|
|
||||||
"gzip",
|
|
||||||
"logipat",
|
|
||||||
"netrw",
|
|
||||||
"netrwPlugin",
|
|
||||||
"netrwSettings",
|
|
||||||
"netrwFileHandlers",
|
|
||||||
"matchit",
|
|
||||||
"tar",
|
|
||||||
"tarPlugin",
|
|
||||||
"rrhelper",
|
|
||||||
"spellfile_plugin",
|
|
||||||
"vimball",
|
|
||||||
"vimballPlugin",
|
|
||||||
"zip",
|
|
||||||
"zipPlugin",
|
|
||||||
"tutor",
|
|
||||||
"rplugin",
|
|
||||||
"syntax",
|
|
||||||
"synmenu",
|
|
||||||
"optwin",
|
|
||||||
"compiler",
|
|
||||||
"bugreport",
|
|
||||||
"ftplugin",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
require("nvchad.configs.lspconfig").defaults()
|
|
||||||
|
|
||||||
local lspconfig = require("lspconfig")
|
|
||||||
|
|
||||||
local nvlsp = require("nvchad.configs.lspconfig")
|
|
||||||
local servers = { "jdtls", "html", "cssls", "clangd", "pylsp", "basedpyright", "ruff" }
|
|
||||||
|
|
||||||
local nomap = vim.keymap.del
|
|
||||||
|
|
||||||
for _, lsp in ipairs(servers) do
|
|
||||||
lspconfig[lsp].setup({
|
|
||||||
on_init = nvlsp.on_init,
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
nvlsp.on_attach(client, bufnr)
|
|
||||||
nomap("n", "gD", { buffer = bufnr })
|
|
||||||
nomap("n", "gd", { buffer = bufnr })
|
|
||||||
nomap("n", "gi", { buffer = bufnr })
|
|
||||||
nomap("n", "<leader>sh", { buffer = bufnr })
|
|
||||||
nomap("n", "<leader>D", { buffer = bufnr })
|
|
||||||
nomap("n", "<leader>ra", { buffer = bufnr })
|
|
||||||
nomap("n", "<leader>ca", { buffer = bufnr })
|
|
||||||
nomap("n", "gr", { buffer = bufnr })
|
|
||||||
end,
|
|
||||||
capabilities = nvlsp.capabilities,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
@ -1,84 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.treesitter = {
|
|
||||||
ensure_installed = {
|
|
||||||
"vim",
|
|
||||||
"lua",
|
|
||||||
"html",
|
|
||||||
"css",
|
|
||||||
"javascript",
|
|
||||||
"typescript",
|
|
||||||
"tsx",
|
|
||||||
"php",
|
|
||||||
"c",
|
|
||||||
"cpp",
|
|
||||||
"java",
|
|
||||||
"python",
|
|
||||||
"ninja",
|
|
||||||
"rst",
|
|
||||||
"markdown",
|
|
||||||
"markdown_inline",
|
|
||||||
"bash",
|
|
||||||
"fish",
|
|
||||||
"regex",
|
|
||||||
"git_config",
|
|
||||||
"gitcommit",
|
|
||||||
"git_rebase",
|
|
||||||
"gitignore",
|
|
||||||
"gitattributes",
|
|
||||||
"dockerfile",
|
|
||||||
},
|
|
||||||
indent = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
M.mason = {
|
|
||||||
cmd = true,
|
|
||||||
pkgs = {
|
|
||||||
-- lua stuff
|
|
||||||
"lua-language-server",
|
|
||||||
"stylua",
|
|
||||||
|
|
||||||
-- web dev stuff
|
|
||||||
"css-lsp",
|
|
||||||
"html-lsp",
|
|
||||||
"prettier",
|
|
||||||
|
|
||||||
-- c/cpp stuff
|
|
||||||
"clangd",
|
|
||||||
"clang-format",
|
|
||||||
|
|
||||||
-- java stuff
|
|
||||||
"jdtls",
|
|
||||||
"java-test",
|
|
||||||
"java-debug-adapter",
|
|
||||||
"spring-boot-tools",
|
|
||||||
"lombok",
|
|
||||||
|
|
||||||
-- python stuff
|
|
||||||
"pylsp",
|
|
||||||
"basedpyright",
|
|
||||||
"ruff",
|
|
||||||
"black",
|
|
||||||
|
|
||||||
"hadolint",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- git support in nvimtree
|
|
||||||
M.nvimtree = {
|
|
||||||
git = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
renderer = {
|
|
||||||
highlight_git = true,
|
|
||||||
icons = {
|
|
||||||
show = {
|
|
||||||
git = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@ -1,212 +0,0 @@
|
|||||||
local map = vim.keymap.set
|
|
||||||
|
|
||||||
map("n", "<Esc>", "<cmd>noh<CR>", { desc = "General Clear highlights" })
|
|
||||||
|
|
||||||
map("n", "<C-s>", "<cmd>w<CR>", { desc = "File Save" })
|
|
||||||
map("n", "<C-c>", "<cmd>%y+<CR>", { desc = "File Copy whole" })
|
|
||||||
|
|
||||||
map("n", "<leader>n", "<cmd>set nu!<CR>", { desc = "Toggle Line number" })
|
|
||||||
map("n", "<leader>rn", "<cmd>set rnu!<CR>", { desc = "Toggle Relative number" })
|
|
||||||
map("n", "<leader>ch", "<cmd>NvCheatsheet<CR>", { desc = "Toggle NvCheatsheet" })
|
|
||||||
|
|
||||||
map("n", "<leader>fm", function()
|
|
||||||
require("conform").format { lsp_fallback = true }
|
|
||||||
end, { desc = "Format Files" })
|
|
||||||
|
|
||||||
-- lsp mappings
|
|
||||||
map({ "n", "v" }, "<A-CR>", "<cmd>Lspsaga code_action<CR>", { desc = "LSP code action" })
|
|
||||||
map({ "n", "v" }, "<A-p>", "<cmd>Lspsaga peek_definition<CR>", { desc = "LSP peek definition" })
|
|
||||||
map({ "n", "v" }, "<A-P>", "<cmd>Lspsaga peek_type_definition<CR>", { desc = "LSP peek type definition" })
|
|
||||||
map({ "n", "v" }, "<A-g>", "<cmd>Lspsaga goto_definition<CR>", { desc = "LSP goto definition" })
|
|
||||||
map({ "n", "v" }, "<A-G>", "<cmd>Lspsaga goto_type_definition<CR>", { desc = "LSP goto type definition" })
|
|
||||||
map({ "n", "v" }, "<A-r>", "<cmd>Lspsaga rename ++project<CR>", { desc = "LSP rename" })
|
|
||||||
map({ "n", "v" }, "<A-d>", "<cmd>Lspsaga diagnostic_jump_next<CR>", { desc = "LSP diagnostic next" })
|
|
||||||
map({ "n", "v" }, "<A-D>", "<cmd>Lspsaga diagnostic_jump_prev<CR>", { desc = "LSP diagnostic previous" })
|
|
||||||
|
|
||||||
-- tabufline
|
|
||||||
map("n", "<leader>b", "<cmd>enew<CR>", { desc = "Buffer New" })
|
|
||||||
|
|
||||||
map("n", "<tab>", function()
|
|
||||||
require("nvchad.tabufline").next()
|
|
||||||
end, { desc = "Buffer Goto next" })
|
|
||||||
|
|
||||||
map("n", "<S-tab>", function()
|
|
||||||
require("nvchad.tabufline").prev()
|
|
||||||
end, { desc = "Buffer Goto prev" })
|
|
||||||
|
|
||||||
map("n", "<leader>x", function()
|
|
||||||
require("nvchad.tabufline").close_buffer()
|
|
||||||
end, { desc = "Buffer Close" })
|
|
||||||
|
|
||||||
map("n", "<leader>t", "<cmd>tabnew<CR>", { desc = "Tab New" })
|
|
||||||
|
|
||||||
-- Comment
|
|
||||||
map("n", "<leader>/", "gcc", { desc = "Comment toggle", remap = true })
|
|
||||||
map("v", "<leader>/", "gc", { desc = "Comment toggle", remap = true })
|
|
||||||
|
|
||||||
-- Spider nvim movement
|
|
||||||
map({ "n", "v" }, "w", "<cmd>lua require('spider').motion('w')<CR>", {desc = "Spider Move to next word"})
|
|
||||||
map({ "n", "v" }, "b", "<cmd>lua require('spider').motion('b')<CR>", {desc = "Spider Move to previous word"})
|
|
||||||
map({ "n", "v" }, "e", "<cmd>lua require('spider').motion('e')<CR>", {desc = "Spider Move to end of word"})
|
|
||||||
|
|
||||||
-- nvimtree
|
|
||||||
map("n", "<C-n>", "<cmd>NvimTreeToggle<CR>", { desc = "Nvimtree Toggle window" })
|
|
||||||
map("n", "<leader>e", "<cmd>NvimTreeFocus<CR>", { desc = "Nvimtree Focus window" })
|
|
||||||
|
|
||||||
-- telescope
|
|
||||||
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", { desc = "Telescope Live grep" })
|
|
||||||
map("n", "<leader>fb", "<cmd>Telescope buffers<CR>", { desc = "Telescope Find buffers" })
|
|
||||||
map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", { desc = "Telescope Help page" })
|
|
||||||
|
|
||||||
map("n", "<leader>fo", "<cmd>Telescope oldfiles<CR>", { desc = "Telescope Find oldfiles" })
|
|
||||||
map("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<CR>", { desc = "Telescope Find in current buffer" })
|
|
||||||
map("n", "<leader>cm", "<cmd>Telescope git_commits<CR>", { desc = "Telescope Git commits" })
|
|
||||||
map("n", "<leader>gt", "<cmd>Telescope git_status<CR>", { desc = "Telescope Git status" })
|
|
||||||
map("n", "<leader>pt", "<cmd>Telescope terms<CR>", { desc = "Telescope Pick hidden term" })
|
|
||||||
map("n", "<leader>th", "<cmd>Telescope themes<CR>", { desc = "Telescope Nvchad themes" })
|
|
||||||
map("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Telescope Find files" })
|
|
||||||
map(
|
|
||||||
"n",
|
|
||||||
"<leader>fa",
|
|
||||||
"<cmd>Telescope find_files follow=true no_ignore=true hidden=true<CR>",
|
|
||||||
{ desc = "Telescope Find all files" }
|
|
||||||
)
|
|
||||||
|
|
||||||
-- terminal
|
|
||||||
map("t", "<C-x>", "<C-\\><C-N>", { desc = "Terminal Escape terminal mode" })
|
|
||||||
|
|
||||||
map("t", "<ESC>", function()
|
|
||||||
local win = vim.api.nvim_get_current_win()
|
|
||||||
vim.api.nvim_win_close(win, true)
|
|
||||||
end, { desc = "Terminal Close term in terminal mode" })
|
|
||||||
|
|
||||||
-- new terminals
|
|
||||||
map("n", "<leader>h", function()
|
|
||||||
require("nvchad.term").new { pos = "sp", size = 0.4 }
|
|
||||||
end, { desc = "Terminal New horizontal term" })
|
|
||||||
|
|
||||||
map("n", "<leader>v", function()
|
|
||||||
require("nvchad.term").new { pos = "vsp", size = 0.5 }
|
|
||||||
end, { desc = "Terminal New vertical window" })
|
|
||||||
|
|
||||||
-- toggleable
|
|
||||||
-- map({ "n", "t" }, "<A-v>", function()
|
|
||||||
-- require("nvchad.term").toggle { pos = "vsp", id = "vtoggleTerm", size = 0.3 }
|
|
||||||
-- end, { desc = "Terminal Toggleable vertical term" })
|
|
||||||
--
|
|
||||||
-- map({ "n", "t" }, "<A-h>", function()
|
|
||||||
-- require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm", size = 0.3 }
|
|
||||||
-- end, { desc = "Terminal New horizontal term" })
|
|
||||||
--
|
|
||||||
-- map({ "n", "t" }, "<A-i>", function()
|
|
||||||
-- require("nvchad.term").toggle { pos = "float", id = "floatTerm" }
|
|
||||||
-- end, { desc = "Terminal Toggle Floating term" })
|
|
||||||
|
|
||||||
-- whichkey
|
|
||||||
map("n", "<leader>wK", "<cmd>WhichKey <CR>", { desc = "Whichkey all keymaps" })
|
|
||||||
|
|
||||||
map("n", "<leader>wk", function()
|
|
||||||
vim.cmd("WhichKey " .. vim.fn.input "WhichKey: ")
|
|
||||||
end, { desc = "Whichkey query lookup" })
|
|
||||||
|
|
||||||
-- blankline
|
|
||||||
map("n", "<leader>cc", function()
|
|
||||||
local config = { scope = {} }
|
|
||||||
config.scope.exclude = { language = {}, node_type = {} }
|
|
||||||
config.scope.include = { node_type = {} }
|
|
||||||
local node = require("ibl.scope").get(vim.api.nvim_get_current_buf(), config)
|
|
||||||
|
|
||||||
if node then
|
|
||||||
local start_row, _, end_row, _ = node:range()
|
|
||||||
if start_row ~= end_row then
|
|
||||||
vim.api.nvim_win_set_cursor(vim.api.nvim_get_current_win(), { start_row + 1, 0 })
|
|
||||||
vim.api.nvim_feedkeys("_", "n", true)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end, { desc = "Blankline Jump to current context" })
|
|
||||||
|
|
||||||
-- copilotchat
|
|
||||||
map({ "n", "v" }, "<leader>ccp", function()
|
|
||||||
local actions = require("CopilotChat.actions")
|
|
||||||
require("CopilotChat.integrations.telescope").pick(actions.prompt_actions())
|
|
||||||
end, { desc = "CopilotChat - Prompt actions" })
|
|
||||||
|
|
||||||
map({ "n", "v" }, "<leader>ccq", function()
|
|
||||||
local input = vim.fn.input("Quick Chat: ")
|
|
||||||
if input ~= "" then
|
|
||||||
require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer })
|
|
||||||
end
|
|
||||||
end, { desc = "CopilotChat - Quick chat" })
|
|
||||||
|
|
||||||
map({ "n", "v" }, "<leader>ccf", function()
|
|
||||||
require("CopilotChat").ask("Fix this, using the lsp diagnostics if needed", { selection = require("CopilotChat.select").visual })
|
|
||||||
end, { desc = "CopilotChat - Fix this" })
|
|
||||||
|
|
||||||
-- menu
|
|
||||||
-- vim.keymap.set("n", "<C-t>", function()
|
|
||||||
-- require("menu").open("default")
|
|
||||||
-- end, {})
|
|
||||||
--
|
|
||||||
-- vim.keymap.set("n", "<RightMouse>", function()
|
|
||||||
-- vim.cmd.exec '"normal! \\<RightMouse>"'
|
|
||||||
--
|
|
||||||
-- local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default"
|
|
||||||
-- require("menu").open(options, { mouse = true })
|
|
||||||
-- end, {})
|
|
||||||
|
|
||||||
|
|
||||||
-- Custom mappings
|
|
||||||
map("n", "<space>", ":", { desc = "Enter command mode" })
|
|
||||||
map({ "n", "v" }, "j", "h", { desc = "Move left" })
|
|
||||||
map({ "n", "v" }, "k", "j", { desc = "Move down" })
|
|
||||||
map({ "n", "v" }, "l", "k", { desc = "Move up" })
|
|
||||||
map({ "n", "v" }, "m", "l", { desc = "Move right" })
|
|
||||||
map("n", "<C-j>", "<C-w>h", { desc = "Move the cursor to the left window" })
|
|
||||||
map("n", "<C-k>", "<C-w>j", { desc = "Move the cursor to the bottom window" })
|
|
||||||
map("n", "<C-l>", "<C-w>k", { desc = "Move the cursor to the upper window" })
|
|
||||||
map("n", "<C-m>", "<C-w>l", { desc = "Move the cursor to the right window" })
|
|
||||||
map("n", "<C-up>", "<C-w>+", { desc = "Enlarge window upwards" })
|
|
||||||
map("n", "<C-down>", "<C-w>-", { desc = "Enlarge window downwards" })
|
|
||||||
map("n", "<C-left>", "<C-w>>", { desc = "Enlarge window to the left" })
|
|
||||||
map("n", "<C-right>", "<C-w><", { desc = "Enlarge window to the rigth" })
|
|
||||||
map("n", "o", "o<ESC>")
|
|
||||||
map("n", "O", "O<ESC>")
|
|
||||||
map("n", "n", "nzz")
|
|
||||||
map("n", "N", "Nzz")
|
|
||||||
map({ "n", "v" }, "y", "\"+y")
|
|
||||||
map("n", "yy", "\"+yy")
|
|
||||||
map({ "n", "v" }, "Y", "\"+yg_")
|
|
||||||
map({ "n", "v" }, "p", "\"+p")
|
|
||||||
map({ "n", "v" }, "P", "\"+P")
|
|
||||||
map("n", "<leader>a", function()
|
|
||||||
require("treesj").toggle()
|
|
||||||
end, { desc = "Extends or retracts an instruction block" })
|
|
||||||
map({ "n", "v" }, "<leader>gb", "<cmd>Gitsigns blame<CR>", { desc = "Git blame" })
|
|
||||||
map("i", "jj", "<ESC>", { desc = "Enter normal mode" })
|
|
||||||
map("i", "<C-d>", "<ESC>ddi", { desc = "Delete a line" })
|
|
||||||
map("i", "<C-b>", "<ESC>^i", { desc = "Move Beginning of line" })
|
|
||||||
map("i", "<C-e>", "<End>", { desc = "Move End of line" })
|
|
||||||
map("i", "<C-j>", "<Left>", { desc = "Move Left" })
|
|
||||||
map("i", "<C-m>", "<Right>", { desc = "Move Right" })
|
|
||||||
map("i", "<C-k>", "<Down>", { desc = "Move Down" })
|
|
||||||
map("i", "<C-l>", "<Up>", { desc = "Move Up" })
|
|
||||||
|
|
||||||
-- Disable mappings
|
|
||||||
-- local nomap = vim.keymap.del
|
|
||||||
|
|
||||||
-- LSP unmappings are set in configs/lspconfig.lua
|
|
||||||
|
|
||||||
-- nomap("n", "h")
|
|
||||||
-- nomap("n", "j")
|
|
||||||
-- nomap("n", "k")
|
|
||||||
-- nomap("n", "l")
|
|
||||||
-- nomap("n", "<C-h>")
|
|
||||||
-- nomap("n", "<C-j>")
|
|
||||||
-- nomap("n", "<C-k>")
|
|
||||||
-- nomap("n", "<C-l>")
|
|
||||||
-- nomap("n", "<leader>")
|
|
||||||
|
|
||||||
-- nomap("v", "h")
|
|
||||||
-- nomap("v", "j")
|
|
||||||
-- nomap("v", "k")
|
|
||||||
-- nomap("v", "l")
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
require("nvchad.options")
|
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
|
|
||||||
-- Modification de la taille des tabulations
|
|
||||||
vim.opt.shiftwidth = 4
|
|
||||||
vim.opt.tabstop = 4
|
|
||||||
vim.opt.softtabstop = 4
|
|
||||||
|
|
||||||
vim.opt.shell = "/usr/local/bin/fish"
|
|
||||||
|
|
||||||
vim.opt.foldmethod = "marker"
|
|
||||||
|
|
||||||
-- local o = vim.o
|
|
||||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
|
||||||
30
private_dot_config/nvim/lua/plugins/ai.lua
Normal file
30
private_dot_config/nvim/lua/plugins/ai.lua
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
return {
|
||||||
|
-- Add chat for Copilot
|
||||||
|
{
|
||||||
|
"CopilotC-Nvim/CopilotChat.nvim",
|
||||||
|
opts = {
|
||||||
|
model = "claude-3.5-sonnet",
|
||||||
|
debug = true,
|
||||||
|
auto_insert_mode = false,
|
||||||
|
},
|
||||||
|
build = function()
|
||||||
|
vim.notify("Please run 'make tiktoken' to use CopilotChat")
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
{ "zbirenbaum/copilot.lua" },
|
||||||
|
{ "nvim-lua/plenary.nvim" },
|
||||||
|
{
|
||||||
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" },
|
||||||
|
---@module 'render-markdown'
|
||||||
|
---@type render.md.UserConfig
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
require("render-markdown").setup({
|
||||||
|
file_types = { "markdown", "copilot-chat" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
98
private_dot_config/nvim/lua/plugins/coding.lua
Normal file
98
private_dot_config/nvim/lua/plugins/coding.lua
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
return {
|
||||||
|
-- Treesitter configuration
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"vim",
|
||||||
|
"lua",
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"javascript",
|
||||||
|
"typescript",
|
||||||
|
"tsx",
|
||||||
|
"php",
|
||||||
|
"c",
|
||||||
|
"make",
|
||||||
|
"cmake",
|
||||||
|
"cpp",
|
||||||
|
"java",
|
||||||
|
"python",
|
||||||
|
"ninja",
|
||||||
|
"rst",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"bash",
|
||||||
|
"fish",
|
||||||
|
"regex",
|
||||||
|
"git_config",
|
||||||
|
"gitcommit",
|
||||||
|
"git_rebase",
|
||||||
|
"gitignore",
|
||||||
|
"gitattributes",
|
||||||
|
"dockerfile",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
setup = {
|
||||||
|
clangd = function(_, opts)
|
||||||
|
opts.capabilities.offsetEncoding = { "utf-16" }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- LSP lens
|
||||||
|
{
|
||||||
|
"VidocqH/lsp-lens.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"zeioth/garbage-day.nvim",
|
||||||
|
dependencies = "neovim/nvim-lspconfig",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- DAP and JTDLS (lsp) configuration for Java
|
||||||
|
{
|
||||||
|
"nvim-java/nvim-java",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = {
|
||||||
|
"nvim-java/lua-async-await",
|
||||||
|
"nvim-java/nvim-java-core",
|
||||||
|
"nvim-java/nvim-java-test",
|
||||||
|
"nvim-java/nvim-java-dap",
|
||||||
|
"nvim-java/nvim-java-refactor",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
registries = {
|
||||||
|
"github:nvim-java/mason-registry",
|
||||||
|
"github:mason-org/mason-registry",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
opts = {
|
||||||
|
handlers = {
|
||||||
|
["jdtls"] = function()
|
||||||
|
require("java").setup()
|
||||||
|
require("lspconfig").jdtls.setup({})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
83
private_dot_config/nvim/lua/plugins/colorscheme.lua
Normal file
83
private_dot_config/nvim/lua/plugins/colorscheme.lua
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
local neutral_aqua = "#689d6a"
|
||||||
|
local bright_yellow = "#fadb2f"
|
||||||
|
local dark4 = "#7c6f64"
|
||||||
|
local neutral_yellow = "#d79921"
|
||||||
|
local bright_orange = "#fe8019"
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvchad/base46",
|
||||||
|
lazy = true,
|
||||||
|
build = function()
|
||||||
|
require("base46").load_all_highlights()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- "nvchad/ui",
|
||||||
|
-- branch = "v3.0",
|
||||||
|
-- lazy = false,
|
||||||
|
-- config = function()
|
||||||
|
-- require("nvchad")
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- "nvim-tree/nvim-web-devicons",
|
||||||
|
-- lazy = true,
|
||||||
|
-- opts = function()
|
||||||
|
-- return { override = require("nvchad.icons.devicons") }
|
||||||
|
-- end,
|
||||||
|
-- config = function(_, opts)
|
||||||
|
-- dofile(vim.g.base46_cache .. "devicons")
|
||||||
|
-- require("nvim-web-devicons").setup(opts)
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
|
||||||
|
-- Taken from gruvbox.lua in EdenVim
|
||||||
|
{
|
||||||
|
"ellisonleao/gruvbox.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
config = true,
|
||||||
|
opts = {
|
||||||
|
-- hard, soft, "" (the default contrast)
|
||||||
|
contrast = "soft",
|
||||||
|
background = "dark",
|
||||||
|
transparent_mode = true,
|
||||||
|
inverse = false,
|
||||||
|
overrides = {
|
||||||
|
StatusLine = { bg = "#32302F", fg = "#ebdbb2" },
|
||||||
|
|
||||||
|
BufferlineBufferSelected = { fg = neutral_aqua, bold = true, italic = true },
|
||||||
|
BufferlineSeparator = { fg = neutral_aqua },
|
||||||
|
BufferlineSeparatorSelected = { fg = bright_yellow },
|
||||||
|
|
||||||
|
BufferlineTab = { fg = dark4 },
|
||||||
|
BufferlineTabSelected = { fg = neutral_aqua, bold = true, italic = true },
|
||||||
|
BufferlineTabSeparator = { fg = dark4 },
|
||||||
|
BufferlineTabSeparatorSelected = { fg = dark4 },
|
||||||
|
|
||||||
|
NoiceCmdlinePopupBorder = { fg = "#b8bb26" },
|
||||||
|
|
||||||
|
-- Uncomment to make window separator green (for some people it's too much color in UI)
|
||||||
|
-- WinSeparator = { fg = neutral_aqua },
|
||||||
|
|
||||||
|
FlashLabel = { fg = bright_orange, bold = true },
|
||||||
|
WhichKeySeparator = { fg = neutral_yellow },
|
||||||
|
WhichKey = { fg = bright_yellow },
|
||||||
|
WhichKeyDesc = { fg = neutral_aqua },
|
||||||
|
WhichKeyGroup = { fg = bright_orange },
|
||||||
|
WhichKeyBorder = { fg = neutral_aqua },
|
||||||
|
|
||||||
|
NvimTreeRootFolder = { fg = neutral_aqua },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "gruvbox",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
236
private_dot_config/nvim/lua/plugins/editor.lua
Normal file
236
private_dot_config/nvim/lua/plugins/editor.lua
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
return {
|
||||||
|
{ "nvzone/volt", lazy = true },
|
||||||
|
{ "nvzone/menu", lazy = true },
|
||||||
|
{ "nvzone/minty", cmd = { "Shades", "Huefy" } },
|
||||||
|
|
||||||
|
{
|
||||||
|
"snacks.nvim",
|
||||||
|
opts = {
|
||||||
|
dashboard = {
|
||||||
|
preset = {
|
||||||
|
header = [[
|
||||||
|
I use
|
||||||
|
██████ █████ █████ █████ ███
|
||||||
|
░░██████ ░░███ ░░███ ░░███ ░░░
|
||||||
|
░███░███ ░███ ██████ ██████ ░███ ░███ ████ █████████████
|
||||||
|
░███░░███░███ ███░░███ ███░░███ ░███ ░███ ░░███ ░░███░░███░░███
|
||||||
|
░███ ░░██████ ░███████ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███
|
||||||
|
░███ ░░█████ ░███░░░ ░███ ░███ ░░░█████░ ░███ ░███ ░███ ░███
|
||||||
|
█████ ░░█████░░██████ ░░██████ ░░███ █████ █████░███ █████
|
||||||
|
░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░
|
||||||
|
btw
|
||||||
|
]],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
terminal = {
|
||||||
|
win = {
|
||||||
|
keys = {
|
||||||
|
-- nav_h = { "<C-j>", [[<C-\><C-n><C-w>h]], desc = "Go to Left Window", mode = "t" },
|
||||||
|
nav_k = { "<C-l>", [[<C-\><C-n><C-w>k]], desc = "Go to Upper Window", mode = "t" },
|
||||||
|
nav_j = { "<C-k>", [[<C-\><C-n><C-w>j]], desc = "Go to Lower Window", mode = "t" },
|
||||||
|
-- nav_l = { "<C-h>", [[<C-\><C-n><C-w>l]], desc = "Go to Right Window", mode = "t" },
|
||||||
|
-- Using C-m cause the enter key to not work in terminal
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
|
cmd = "Neotree",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>e", false },
|
||||||
|
{ "<leader>E", false },
|
||||||
|
{
|
||||||
|
"<C-n>",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ toggle = true, dir = vim.fn.getcwd() })
|
||||||
|
end,
|
||||||
|
desc = "Explorer NeoTree (cwd)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
close_if_last_window = true,
|
||||||
|
window = {
|
||||||
|
width = 30,
|
||||||
|
mappings = {
|
||||||
|
["<space>"] = "none",
|
||||||
|
["j"] = "none",
|
||||||
|
["k"] = "none",
|
||||||
|
["l"] = "none",
|
||||||
|
["m"] = "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"Bekaboo/dropbar.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
build = "make",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local dropbar_api = require("dropbar.api")
|
||||||
|
vim.keymap.set("n", "<Leader>;", dropbar_api.pick, { desc = "Pick symbols in winbar" })
|
||||||
|
vim.keymap.set("n", "[;", dropbar_api.goto_context_start, { desc = "Go to start of current context" })
|
||||||
|
vim.keymap.set("n", "];", dropbar_api.select_next_context, { desc = "Select next context" })
|
||||||
|
end,
|
||||||
|
init = function()
|
||||||
|
require("which-key").add({
|
||||||
|
{ "<Leader>;", name = "Pick symbols in winbar", prefix = ";", icon = { icon = "", color = "blue" } },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Hex editor
|
||||||
|
{
|
||||||
|
"RaafatTurki/hex.nvim",
|
||||||
|
config = true,
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Auto-save
|
||||||
|
{
|
||||||
|
"okuuva/auto-save.nvim",
|
||||||
|
event = { "InsertLeave", "TextChanged" },
|
||||||
|
opts = {
|
||||||
|
noautocmd = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Remember last position
|
||||||
|
{
|
||||||
|
"ethanholz/nvim-lastplace",
|
||||||
|
event = "BufRead",
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Better word movement
|
||||||
|
{
|
||||||
|
"chrisgrieser/nvim-spider",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Underline current word
|
||||||
|
-- {
|
||||||
|
-- "itchyny/vim-cursorword",
|
||||||
|
-- event = { "BufEnter", "BufNewFile" },
|
||||||
|
-- },
|
||||||
|
|
||||||
|
-- Full visual line
|
||||||
|
{
|
||||||
|
"0xAdk/full_visual_line.nvim",
|
||||||
|
keys = "V",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- "csessh/stopinsert.nvim",
|
||||||
|
-- opts = {
|
||||||
|
-- idle_time_ms = 15000,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
|
||||||
|
-- Minimap
|
||||||
|
{
|
||||||
|
"gorbit99/codewindow.nvim",
|
||||||
|
lazy = false,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>m",
|
||||||
|
function()
|
||||||
|
require("codewindow").toggle_minimap()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Minimap",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
z_index = 50,
|
||||||
|
auto_enable = true,
|
||||||
|
minimap_width = 10,
|
||||||
|
screen_bounds = "background",
|
||||||
|
window_border = "none",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Split or join code blocks
|
||||||
|
{
|
||||||
|
"Wansmer/treesj",
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
|
opts = { use_default_keymaps = false },
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"n",
|
||||||
|
"<leader>A",
|
||||||
|
function()
|
||||||
|
require("treesj").toggle()
|
||||||
|
end,
|
||||||
|
{ desc = "Extends or retracts an instruction block" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
require("which-key").add({
|
||||||
|
{
|
||||||
|
"<leader>A",
|
||||||
|
name = "Extends or retracts an instruction block",
|
||||||
|
prefix = "A",
|
||||||
|
icon = { icon = "", color = "green" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"brenton-leighton/multiple-cursors.nvim",
|
||||||
|
version = "*",
|
||||||
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ "<C-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "i", "x" }, desc = "Add cursor and move up" },
|
||||||
|
{ "<C-Down>", "<Cmd>MultipleCursorsAddDown<CR>", mode = { "i", "x" }, desc = "Add cursor and move down" },
|
||||||
|
{
|
||||||
|
"<C-LeftMouse>",
|
||||||
|
"<Cmd>MultipleCursorsMouseAddDelete<CR>",
|
||||||
|
mode = { "n", "v", "i" },
|
||||||
|
desc = "Add or remove cursor",
|
||||||
|
},
|
||||||
|
{ "<leader>Ca", "<Cmd>MultipleCursorsAddMatches<CR>", mode = { "n", "v", "x" }, desc = "Add cursors to cword" },
|
||||||
|
{
|
||||||
|
"<leader>CA",
|
||||||
|
"<Cmd>MultipleCursorsAddMatchesV<CR>",
|
||||||
|
mode = { "n", "v", "x" },
|
||||||
|
desc = "Add cursors to cword in previous area",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>Cd",
|
||||||
|
"<Cmd>MultipleCursorsAddJumpNextMatch<CR>",
|
||||||
|
mode = { "n", "v", "x" },
|
||||||
|
desc = "Add cursor and jump to next cword",
|
||||||
|
},
|
||||||
|
{ "<leader>CD", "<Cmd>MultipleCursorsJumpNextMatch<CR>", mode = { "n", "v", "x" }, desc = "Jump to next cword" },
|
||||||
|
{ "<leader>Cl", "<Cmd>MultipleCursorsLock<CR>", mode = { "n", "v", "x" }, desc = "Lock virtual cursors" },
|
||||||
|
},
|
||||||
|
init = function()
|
||||||
|
require("which-key").add({
|
||||||
|
{ "<Leader>C", name = "cursor", prefix = "C", icon = { icon = "", color = "cyan" } },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"m4xshen/hardtime.nvim",
|
||||||
|
dependencies = { "MunifTanjim/nui.nvim" },
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"2kabhishek/nerdy.nvim",
|
||||||
|
cmd = "Nerdy",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"ThePrimeagen/vim-be-good",
|
||||||
|
},
|
||||||
|
}
|
||||||
197
private_dot_config/nvim/lua/plugins/example.lua
Normal file
197
private_dot_config/nvim/lua/plugins/example.lua
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||||
|
-- stylua: ignore
|
||||||
|
if true then return {} end
|
||||||
|
|
||||||
|
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||||
|
--
|
||||||
|
-- In your plugin files, you can:
|
||||||
|
-- * add extra plugins
|
||||||
|
-- * disable/enabled LazyVim plugins
|
||||||
|
-- * override the configuration of LazyVim plugins
|
||||||
|
return {
|
||||||
|
-- add gruvbox
|
||||||
|
{ "ellisonleao/gruvbox.nvim" },
|
||||||
|
|
||||||
|
-- Configure LazyVim to load gruvbox
|
||||||
|
{
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
colorscheme = "gruvbox",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- change trouble config
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
-- opts will be merged with the parent spec
|
||||||
|
opts = { use_diagnostic_signs = true },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- disable trouble
|
||||||
|
{ "folke/trouble.nvim", enabled = false },
|
||||||
|
|
||||||
|
-- override nvim-cmp and add cmp-emoji
|
||||||
|
{
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
dependencies = { "hrsh7th/cmp-emoji" },
|
||||||
|
---@param opts cmp.ConfigSchema
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sources, { name = "emoji" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- change some telescope options and a keymap to browse plugin files
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
keys = {
|
||||||
|
-- add a keymap to browse plugin files
|
||||||
|
-- stylua: ignore
|
||||||
|
{
|
||||||
|
"<leader>fp",
|
||||||
|
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||||
|
desc = "Find Plugin File",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- change some options
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
layout_strategy = "horizontal",
|
||||||
|
layout_config = { prompt_position = "top" },
|
||||||
|
sorting_strategy = "ascending",
|
||||||
|
winblend = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add pyright to lspconfig
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
---@class PluginLspOpts
|
||||||
|
opts = {
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||||
|
pyright = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = {
|
||||||
|
"jose-elias-alvarez/typescript.nvim",
|
||||||
|
init = function()
|
||||||
|
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||||
|
-- stylua: ignore
|
||||||
|
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||||
|
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
---@class PluginLspOpts
|
||||||
|
opts = {
|
||||||
|
---@type lspconfig.options
|
||||||
|
servers = {
|
||||||
|
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||||
|
tsserver = {},
|
||||||
|
},
|
||||||
|
-- you can do any additional lsp server setup here
|
||||||
|
-- return true if you don't want this server to be setup with lspconfig
|
||||||
|
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||||
|
setup = {
|
||||||
|
-- example to setup with typescript.nvim
|
||||||
|
tsserver = function(_, opts)
|
||||||
|
require("typescript").setup({ server = opts })
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
-- Specify * to use this function as a fallback for any server
|
||||||
|
-- ["*"] = function(server, opts) end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||||
|
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||||
|
|
||||||
|
-- add more treesitter parsers
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"json",
|
||||||
|
"lua",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"python",
|
||||||
|
"query",
|
||||||
|
"regex",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vim",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||||
|
-- would overwrite `ensure_installed` with the new value.
|
||||||
|
-- If you'd rather extend the default config, use the code below instead:
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- add tsx and treesitter
|
||||||
|
vim.list_extend(opts.ensure_installed, {
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- the opts function can also be used to change the default opts:
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function(_, opts)
|
||||||
|
table.insert(opts.sections.lualine_x, {
|
||||||
|
function()
|
||||||
|
return "😄"
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- or you can return new options to override all the defaults
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
return {
|
||||||
|
--[[add your custom lualine config here]]
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- use mini.starter instead of alpha
|
||||||
|
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||||
|
|
||||||
|
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||||
|
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||||
|
|
||||||
|
-- add any tools you want to have installed below
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"stylua",
|
||||||
|
"shellcheck",
|
||||||
|
"shfmt",
|
||||||
|
"flake8",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@ -1,65 +0,0 @@
|
|||||||
local overrides = require("configs.overrides")
|
|
||||||
|
|
||||||
return {
|
|
||||||
-- Format the file on save
|
|
||||||
{
|
|
||||||
"stevearc/conform.nvim",
|
|
||||||
event = 'BufWritePre',
|
|
||||||
config = function()
|
|
||||||
require "configs.conform"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Install the parser (overrides)
|
|
||||||
{
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
opts = overrides.treesitter,
|
|
||||||
},
|
|
||||||
-- File explorer (overrides)
|
|
||||||
{
|
|
||||||
"nvim-tree/nvim-tree.lua",
|
|
||||||
opts = overrides.nvimtree,
|
|
||||||
},
|
|
||||||
-- Install and manage LSP servers (overrides)
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = overrides.mason,
|
|
||||||
},
|
|
||||||
-- LSP configuration (overrides)
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
config = function()
|
|
||||||
require("nvchad.configs.lspconfig").defaults()
|
|
||||||
require "configs.lspconfig"
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
{
|
|
||||||
"nvimdev/lspsaga.nvim",
|
|
||||||
config = function()
|
|
||||||
require('lspsaga').setup({
|
|
||||||
lightbulb = {
|
|
||||||
enabled = false,
|
|
||||||
virtual_text = false,
|
|
||||||
sign = false,
|
|
||||||
},
|
|
||||||
code_action = {
|
|
||||||
extend_gitsigns = true,
|
|
||||||
},
|
|
||||||
rename = {
|
|
||||||
auto_save = true,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
dependencies = {
|
|
||||||
"mfussenegger/nvim-dap-python",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,327 +0,0 @@
|
|||||||
local plugins = {
|
|
||||||
-- Open binary files in hex mode and edit them
|
|
||||||
{
|
|
||||||
"RaafatTurki/hex.nvim",
|
|
||||||
config = true,
|
|
||||||
lazy = false,
|
|
||||||
},
|
|
||||||
-- Auto-save files when in normal mode
|
|
||||||
{
|
|
||||||
"Pocco81/auto-save.nvim",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
require("auto-save").setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Open every file where you left off
|
|
||||||
{
|
|
||||||
"ethanholz/nvim-lastplace",
|
|
||||||
event = "BufRead",
|
|
||||||
config = function()
|
|
||||||
require("nvim-lastplace").setup({
|
|
||||||
lastplace_ignore_buftype = { "quickfix", "nofile", "help" },
|
|
||||||
lastplace_ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit", },
|
|
||||||
lastplace_open_folds = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Map keys for better word movement
|
|
||||||
{
|
|
||||||
"chrisgrieser/nvim-spider",
|
|
||||||
lazy = true,
|
|
||||||
},
|
|
||||||
-- Map keys for smooth scrolling
|
|
||||||
{
|
|
||||||
"karb94/neoscroll.nvim",
|
|
||||||
event = "WinScrolled",
|
|
||||||
config = function()
|
|
||||||
require('neoscroll').setup({
|
|
||||||
-- All these keys will be mapped to their corresponding default scrolling animation
|
|
||||||
mappings = { '<C-u>', '<C-d>', '<C-b>', '<C-f>', '<C-y>', '<C-e>', 'zt', 'zz', 'zb' },
|
|
||||||
hide_cursor = true, -- Hide cursor while scrolling
|
|
||||||
stop_eof = true, -- Stop at <EOF> when scrolling downwards
|
|
||||||
use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope
|
|
||||||
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
|
|
||||||
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
|
|
||||||
easing_function = nil, -- Default easing function
|
|
||||||
pre_hook = nil, -- Function to run before the scrolling animation starts
|
|
||||||
post_hook = nil, -- Function to run after the scrolling animation ends
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Underline current and matching word
|
|
||||||
{
|
|
||||||
"itchyny/vim-cursorword",
|
|
||||||
event = {"BufEnter", "BufNewFile"},
|
|
||||||
config = function()
|
|
||||||
vim.api.nvim_command("augroup user_plugin_cursorword")
|
|
||||||
vim.api.nvim_command("autocmd!")
|
|
||||||
vim.api.nvim_command("autocmd FileType NvimTree,lspsagafinder,dashboard,vista let b:cursorword = 0")
|
|
||||||
vim.api.nvim_command("autocmd WinEnter * if &diff || &pvw | let b:cursorword = 0 | endif")
|
|
||||||
vim.api.nvim_command("autocmd InsertEnter * let b:cursorword = 0")
|
|
||||||
vim.api.nvim_command("autocmd InsertLeave * let b:cursorword = 1")
|
|
||||||
vim.api.nvim_command("augroup END")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Highlight the entire line in visual line mode
|
|
||||||
{
|
|
||||||
"0xAdk/full_visual_line.nvim",
|
|
||||||
keys = 'V',
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
-- Display number of uses of a Function
|
|
||||||
{
|
|
||||||
'VidocqH/lsp-lens.nvim',
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {
|
|
||||||
setup = function()
|
|
||||||
require('lsp-lens').setup()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Split or join block of code
|
|
||||||
{
|
|
||||||
"Wansmer/treesj",
|
|
||||||
dependencies = { 'nvim-treesitter/nvim-treesitter' },
|
|
||||||
config = function()
|
|
||||||
require('treesj').setup({
|
|
||||||
use_default_keymaps = false,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Replace the UI for messages, cmdline, and the popupmenu
|
|
||||||
{
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
config = function()
|
|
||||||
require("noice").setup({
|
|
||||||
lsp = {
|
|
||||||
override = {
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
["cmp.entry.get_documentation"] = true,
|
|
||||||
},
|
|
||||||
signature = { enable = false },
|
|
||||||
hover = { enable = false },
|
|
||||||
},
|
|
||||||
presets = {
|
|
||||||
bottom_search = true,
|
|
||||||
command_palette = true,
|
|
||||||
long_message_to_split = true,
|
|
||||||
inc_rename = false,
|
|
||||||
lsp_doc_border = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
{
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
opts = {
|
|
||||||
background_colour = "#000000",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Display the lsp diagnostics in a window
|
|
||||||
{
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
|
||||||
cmd = "Trouble",
|
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>xx",
|
|
||||||
"<cmd>Trouble diagnostics toggle<cr>",
|
|
||||||
desc = "Diagnostics (Trouble)",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>cs",
|
|
||||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
|
||||||
desc = "Symbols (Trouble)",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Minimap plugin
|
|
||||||
{
|
|
||||||
"gorbit99/codewindow.nvim",
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
|
||||||
local codewindow = require("codewindow")
|
|
||||||
-- vim.api.nvim_set_hl(0, "CodewindowBorder", {fg = "#928374"})
|
|
||||||
codewindow.setup({
|
|
||||||
auto_enable = true,
|
|
||||||
minimap_width = 10,
|
|
||||||
screen_bounds = "background",
|
|
||||||
window_border = "none",
|
|
||||||
})
|
|
||||||
codewindow.apply_default_keybinds({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Highlight the indent line and the current chunk
|
|
||||||
{
|
|
||||||
"shellRaining/hlchunk.nvim",
|
|
||||||
event = { "UIEnter" },
|
|
||||||
config = function()
|
|
||||||
require("hlchunk").setup({
|
|
||||||
chunk = {
|
|
||||||
enable = true,
|
|
||||||
chars = {
|
|
||||||
horizontal_line = "─",
|
|
||||||
vertical_line = "│",
|
|
||||||
left_top = "╭",
|
|
||||||
left_bottom = "╰",
|
|
||||||
right_arrow = ">",
|
|
||||||
},
|
|
||||||
style = {
|
|
||||||
{ fg = "#FABD2F" },
|
|
||||||
{ fg = "#c21f30" }, -- this fg is used to highlight wrong chunk
|
|
||||||
},
|
|
||||||
},
|
|
||||||
indent = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
line_num = {
|
|
||||||
enable = true,
|
|
||||||
style = "#FABD2F",
|
|
||||||
},
|
|
||||||
blank = {
|
|
||||||
enable = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
-- Integrate Github Copilot in NeoVim
|
|
||||||
{
|
|
||||||
"zbirenbaum/copilot.lua",
|
|
||||||
lazy = false,
|
|
||||||
cmd = "Copilot",
|
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
|
||||||
require("copilot").setup({
|
|
||||||
panel = {
|
|
||||||
enabled = true,
|
|
||||||
auto_refresh = true,
|
|
||||||
keymap = {
|
|
||||||
jump_prev = "[[",
|
|
||||||
jump_next = "]]",
|
|
||||||
accept = "<CR>",
|
|
||||||
refresh = "gr",
|
|
||||||
open = "<M-CR>"
|
|
||||||
},
|
|
||||||
layout = {
|
|
||||||
position = "bottom", -- | top | left | right
|
|
||||||
ratio = 0.4
|
|
||||||
},
|
|
||||||
},
|
|
||||||
suggestion = {
|
|
||||||
enabled = true,
|
|
||||||
auto_trigger = true,
|
|
||||||
debounce = 75,
|
|
||||||
keymap = {
|
|
||||||
accept = "<M-l>",
|
|
||||||
accept_word = false,
|
|
||||||
accept_line = false,
|
|
||||||
next = "<M-]>",
|
|
||||||
prev = "<M-[>",
|
|
||||||
dismiss = "<C-]>",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filetypes = {
|
|
||||||
yaml = false,
|
|
||||||
markdown = true,
|
|
||||||
help = false,
|
|
||||||
gitcommit = false,
|
|
||||||
gitrebase = false,
|
|
||||||
hgcommit = false,
|
|
||||||
svn = false,
|
|
||||||
cvs = false,
|
|
||||||
["."] = false,
|
|
||||||
},
|
|
||||||
copilot_node_command = 'node', -- Node.js version must be > 18.x
|
|
||||||
server_opts_overrides = {},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Chat for copilot
|
|
||||||
{
|
|
||||||
"CopilotC-Nvim/CopilotChat.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
branch = "main",
|
|
||||||
dependencies = {
|
|
||||||
{ "zbirenbaum/copilot.lua" }, -- or github/copilot.vim
|
|
||||||
{ "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
|
|
||||||
{
|
|
||||||
'MeanderingProgrammer/render-markdown.nvim',
|
|
||||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' },
|
|
||||||
---@module 'render-markdown'
|
|
||||||
---@type render.md.UserConfig
|
|
||||||
opts = {},
|
|
||||||
config = function ()
|
|
||||||
require('render-markdown').setup({
|
|
||||||
file_types = { 'markdown', 'copilot-chat' },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
},
|
|
||||||
build = "make tiktoken",
|
|
||||||
opts = {
|
|
||||||
debug = true, -- Enable debugging
|
|
||||||
model = "claude-3.5-sonnet",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
},
|
|
||||||
config = function ()
|
|
||||||
require('CopilotChat').setup({
|
|
||||||
model = "claude-3.5-sonnet",
|
|
||||||
highlight_headers = false,
|
|
||||||
separator = '---',
|
|
||||||
error_header = '> [!ERROR] Error',
|
|
||||||
})
|
|
||||||
end
|
|
||||||
},
|
|
||||||
-- Suspend unused lsp
|
|
||||||
{
|
|
||||||
"zeioth/garbage-day.nvim",
|
|
||||||
dependencies = "neovim/nvim-lspconfig",
|
|
||||||
event = "VeryLazy",
|
|
||||||
},
|
|
||||||
-- DAP and JTDLS (lsp) configuration for Java
|
|
||||||
{
|
|
||||||
"nvim-java/nvim-java",
|
|
||||||
lazy = false,
|
|
||||||
dependencies = {
|
|
||||||
"nvim-java/lua-async-await",
|
|
||||||
"nvim-java/nvim-java-core",
|
|
||||||
"nvim-java/nvim-java-test",
|
|
||||||
"nvim-java/nvim-java-dap",
|
|
||||||
"nvim-java/nvim-java-refactor",
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
"mfussenegger/nvim-dap",
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = {
|
|
||||||
registries = {
|
|
||||||
"github:nvim-java/mason-registry",
|
|
||||||
"github:mason-org/mason-registry",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
opts = {
|
|
||||||
handlers = {
|
|
||||||
["jdtls"] = function()
|
|
||||||
require("java").setup()
|
|
||||||
require("lspconfig").jdtls.setup({})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return plugins
|
|
||||||
Loading…
Reference in New Issue
Block a user