Compare commits
1
Commits
master
..
fac7a710d9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fac7a710d9 |
+6
-2
@@ -1,3 +1,7 @@
|
||||
lazy-lock.json
|
||||
spell/*
|
||||
tags
|
||||
test.sh
|
||||
.luarc.json
|
||||
nvim
|
||||
|
||||
spell/
|
||||
lazy-lock.json
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,241 @@
|
||||
# kickstart.nvim
|
||||
|
||||
## Introduction
|
||||
|
||||
A starting point for Neovim that is:
|
||||
|
||||
* Small
|
||||
* Single-file
|
||||
* Completely Documented
|
||||
|
||||
**NOT** a Neovim distribution, but instead a starting point for your configuration.
|
||||
|
||||
## Installation
|
||||
|
||||
### Install Neovim
|
||||
|
||||
Kickstart.nvim targets *only* the latest
|
||||
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
|
||||
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
|
||||
If you are experiencing issues, please make sure you have the latest versions.
|
||||
|
||||
### Install External Dependencies
|
||||
|
||||
External Requirements:
|
||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
|
||||
[fd-find](https://github.com/sharkdp/fd#installation)
|
||||
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
|
||||
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
|
||||
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
|
||||
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
|
||||
- Language Setup:
|
||||
- If you want to write Typescript, you need `npm`
|
||||
- If you want to write Golang, you will need `go`
|
||||
- etc.
|
||||
|
||||
> [!NOTE]
|
||||
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
|
||||
> and quick install snippets
|
||||
|
||||
### Install Kickstart
|
||||
|
||||
> [!NOTE]
|
||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||
|
||||
Neovim's configurations are located under the following paths, depending on your OS:
|
||||
|
||||
| OS | PATH |
|
||||
| :- | :--- |
|
||||
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
|
||||
| Windows (cmd)| `%localappdata%\nvim\` |
|
||||
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
|
||||
|
||||
#### Recommended Step
|
||||
|
||||
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
|
||||
so that you have your own copy that you can modify, then install by cloning the
|
||||
fork to your machine using one of the commands below, depending on your OS.
|
||||
|
||||
> [!NOTE]
|
||||
> Your fork's URL will be something like this:
|
||||
> `https://github.com/<your_github_username>/kickstart.nvim.git`
|
||||
|
||||
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
|
||||
too - it's ignored in the kickstart repo to make maintenance easier, but it's
|
||||
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
|
||||
|
||||
#### Clone kickstart.nvim
|
||||
|
||||
> [!NOTE]
|
||||
> If following the recommended step above (i.e., forking the repo), replace
|
||||
> `nvim-lua` with `<your_github_username>` in the commands below
|
||||
|
||||
<details><summary> Linux and Mac </summary>
|
||||
|
||||
```sh
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary> Windows </summary>
|
||||
|
||||
If you're using `cmd.exe`:
|
||||
|
||||
```
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
|
||||
```
|
||||
|
||||
If you're using `powershell.exe`
|
||||
|
||||
```
|
||||
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Post Installation
|
||||
|
||||
Start Neovim
|
||||
|
||||
```sh
|
||||
nvim
|
||||
```
|
||||
|
||||
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
||||
the current plugin status. Hit `q` to close the window.
|
||||
|
||||
#### Read The Friendly Documentation
|
||||
|
||||
Read through the `init.lua` file in your configuration folder for more
|
||||
information about extending and exploring Neovim. That also includes
|
||||
examples of adding popularly requested plugins.
|
||||
|
||||
> [!NOTE]
|
||||
> For more information about a particular plugin check its repository's documentation.
|
||||
|
||||
|
||||
### Getting Started
|
||||
|
||||
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
|
||||
|
||||
### FAQ
|
||||
|
||||
* What should I do if I already have a pre-existing Neovim configuration?
|
||||
* You should back it up and then delete all associated files.
|
||||
* This includes your existing init.lua and the Neovim files in `~/.local`
|
||||
which can be deleted with `rm -rf ~/.local/share/nvim/`
|
||||
* Can I keep my existing configuration in parallel to kickstart?
|
||||
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
|
||||
to maintain multiple configurations. For example, you can install the kickstart
|
||||
configuration in `~/.config/nvim-kickstart` and create an alias:
|
||||
```
|
||||
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
|
||||
```
|
||||
When you run Neovim using `nvim-kickstart` alias it will use the alternative
|
||||
config directory and the matching local directory
|
||||
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
|
||||
distribution that you would like to try out.
|
||||
* What if I want to "uninstall" this configuration:
|
||||
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
|
||||
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
|
||||
* The main purpose of kickstart is to serve as a teaching tool and a reference
|
||||
configuration that someone can easily use to `git clone` as a basis for their own.
|
||||
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
|
||||
into smaller parts. A fork of kickstart that does this while maintaining the
|
||||
same functionality is available here:
|
||||
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
|
||||
* Discussions on this topic can be found here:
|
||||
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
||||
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
||||
|
||||
### Install Recipes
|
||||
|
||||
Below you can find OS specific install instructions for Neovim and dependencies.
|
||||
|
||||
After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step.
|
||||
|
||||
#### Windows Installation
|
||||
|
||||
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
|
||||
Installation may require installing build tools and updating the run command for `telescope-fzf-native`
|
||||
|
||||
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
||||
|
||||
This requires:
|
||||
|
||||
- Install CMake and the Microsoft C++ Build Tools on Windows
|
||||
|
||||
```lua
|
||||
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
||||
```
|
||||
</details>
|
||||
<details><summary>Windows with gcc/make using chocolatey</summary>
|
||||
Alternatively, one can install gcc and make which don't require changing the config,
|
||||
the easiest way is to use choco:
|
||||
|
||||
1. install [chocolatey](https://chocolatey.org/install)
|
||||
either follow the instructions on the page or use winget,
|
||||
run in cmd as **admin**:
|
||||
```
|
||||
winget install --accept-source-agreements chocolatey.chocolatey
|
||||
```
|
||||
|
||||
2. install all requirements using choco, exit the previous cmd and
|
||||
open a new one so that choco path is set, and run in cmd as **admin**:
|
||||
```
|
||||
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
|
||||
```
|
||||
</details>
|
||||
<details><summary>WSL (Windows Subsystem for Linux)</summary>
|
||||
|
||||
```
|
||||
wsl --install
|
||||
wsl
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip git xclip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
#### Linux Install
|
||||
<details><summary>Ubuntu Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip git xclip neovim
|
||||
```
|
||||
</details>
|
||||
<details><summary>Debian Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt install make gcc ripgrep unzip git xclip curl
|
||||
|
||||
# Now we install nvim
|
||||
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
|
||||
sudo rm -rf /opt/nvim-linux-x86_64
|
||||
sudo mkdir -p /opt/nvim-linux-x86_64
|
||||
sudo chmod a+rX /opt/nvim-linux-x86_64
|
||||
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
|
||||
|
||||
# make it available in /usr/local/bin, distro installs to /usr/bin
|
||||
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
|
||||
```
|
||||
</details>
|
||||
<details><summary>Fedora Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
<details><summary>Arch Install Steps</summary>
|
||||
|
||||
```
|
||||
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
|
||||
```
|
||||
</details>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
return {
|
||||
bg = "#291414",
|
||||
fg = "#f3f2f2",
|
||||
accent = "#e46767",
|
||||
error = "#fd4663",
|
||||
warning = "#cccc66",
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
return {
|
||||
|
||||
-- color approach
|
||||
|
||||
red = "#ff3d00",
|
||||
orange = "#e58e44",
|
||||
green = "#77b886",
|
||||
yellow = "#f7cb92",
|
||||
blue = "#7689d9",
|
||||
magenta = "#8f509d",
|
||||
cyan = "#8fb9f4",
|
||||
black = "#000000",
|
||||
bright_red = "#ff6347",
|
||||
bright_orange = "#f6aa6b",
|
||||
bright_green = "#a3d6a5",
|
||||
bright_yellow = "#ffe56e",
|
||||
bright_blue = "#9eabe6",
|
||||
bright_magenta = "#b78fc2",
|
||||
bright_cyan = "#a4c4ff",
|
||||
white = "#ffffff",
|
||||
gutter_fg = "#78808f",
|
||||
nontext = "#d2d6dc",
|
||||
-- element approach
|
||||
bg = "#0f1c2e",
|
||||
fg = "#e6e8ee",
|
||||
cursorline = "#1c2b3a",
|
||||
selection = "#2e3c55",
|
||||
linenr = "#4a5a70",
|
||||
comment = "#7d88a1",
|
||||
|
||||
-- Syntax
|
||||
keyword = "#f28fad",
|
||||
Function = "#89b4fa",
|
||||
string = "#f9e2af",
|
||||
constant = "#cdd6f4",
|
||||
type = "#cba6f7",
|
||||
number = "#fab387",
|
||||
boolean = "#f38ba8",
|
||||
operator = "#94a3b8",
|
||||
variable = "#e0def4",
|
||||
|
||||
-- UI
|
||||
cursor = "#f5a97f",
|
||||
visual = "#2e3c55",
|
||||
search = "#f5c2e7",
|
||||
statusline = "#1e293b",
|
||||
menu_bg = "#1a2535",
|
||||
menu_sel = "#3b4252",
|
||||
fold = "#3e4a5a",
|
||||
split = "#334155",
|
||||
|
||||
-- Diagnostics
|
||||
diag_error = "#f38ba8",
|
||||
diag_warn = "#fab387",
|
||||
diag_info = "#89dceb",
|
||||
diag_hint = "#b4befe",
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
================================================================================
|
||||
INTRODUCTION *kickstart.nvim*
|
||||
|
||||
Kickstart.nvim is a project to help you get started on your neovim journey.
|
||||
|
||||
*kickstart-is-not*
|
||||
It is not:
|
||||
- Complete framework for every plugin under the sun
|
||||
- Place to add every plugin that could ever be useful
|
||||
|
||||
*kickstart-is*
|
||||
It is:
|
||||
- Somewhere that has a good start for the most common "IDE" type features:
|
||||
- autocompletion
|
||||
- goto-definition
|
||||
- find references
|
||||
- fuzzy finding
|
||||
- and hinting at what more can be done :)
|
||||
- A place to _kickstart_ your journey.
|
||||
- You should fork this project and use/modify it so that it matches your
|
||||
style and preferences. If you don't want to do that, there are probably
|
||||
other projects that would fit much better for you (and that's great!)!
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
@@ -0,0 +1,3 @@
|
||||
kickstart-is kickstart.txt /*kickstart-is*
|
||||
kickstart-is-not kickstart.txt /*kickstart-is-not*
|
||||
kickstart.nvim kickstart.txt /*kickstart.nvim*
|
||||
-113
@@ -1,113 +0,0 @@
|
||||
let SessionLoad = 1
|
||||
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
|
||||
let v:this_session=expand("<sfile>:p")
|
||||
doautoall SessionLoadPre
|
||||
silent only
|
||||
silent tabonly
|
||||
cd ~/.config/nvim
|
||||
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||
let s:wipebuf = bufnr('%')
|
||||
endif
|
||||
let s:shortmess_save = &shortmess
|
||||
set shortmess+=aoO
|
||||
badd +35 lua/keybinds.lua
|
||||
badd +27 lua/custom-functions.lua
|
||||
argglobal
|
||||
%argdel
|
||||
$argadd lua/keybinds.lua
|
||||
edit lua/keybinds.lua
|
||||
let s:save_splitbelow = &splitbelow
|
||||
let s:save_splitright = &splitright
|
||||
set splitbelow splitright
|
||||
wincmd _ | wincmd |
|
||||
vsplit
|
||||
wincmd _ | wincmd |
|
||||
vsplit
|
||||
2wincmd h
|
||||
wincmd w
|
||||
wincmd w
|
||||
let &splitbelow = s:save_splitbelow
|
||||
let &splitright = s:save_splitright
|
||||
wincmd t
|
||||
let s:save_winminheight = &winminheight
|
||||
let s:save_winminwidth = &winminwidth
|
||||
set winminheight=0
|
||||
set winheight=1
|
||||
set winminwidth=0
|
||||
set winwidth=1
|
||||
exe 'vert 1resize ' . ((&columns * 30 + 106) / 212)
|
||||
exe 'vert 2resize ' . ((&columns * 90 + 106) / 212)
|
||||
exe 'vert 3resize ' . ((&columns * 90 + 106) / 212)
|
||||
argglobal
|
||||
enew
|
||||
file NvimTree_1
|
||||
balt lua/keybinds.lua
|
||||
setlocal foldmethod=manual
|
||||
setlocal foldexpr=0
|
||||
setlocal foldmarker={{{,}}}
|
||||
setlocal foldignore=#
|
||||
setlocal foldlevel=0
|
||||
setlocal foldminlines=1
|
||||
setlocal foldnestmax=20
|
||||
setlocal nofoldenable
|
||||
wincmd w
|
||||
argglobal
|
||||
balt lua/custom-functions.lua
|
||||
setlocal foldmethod=marker
|
||||
setlocal foldexpr=v:lua.vim.treesitter.foldexpr()
|
||||
setlocal foldmarker={{{,}}}
|
||||
setlocal foldignore=#
|
||||
setlocal foldlevel=0
|
||||
setlocal foldminlines=1
|
||||
setlocal foldnestmax=20
|
||||
setlocal foldenable
|
||||
let s:l = 35 - ((12 * winheight(0) + 24) / 48)
|
||||
if s:l < 1 | let s:l = 1 | endif
|
||||
keepjumps exe s:l
|
||||
normal! zt
|
||||
keepjumps 35
|
||||
normal! 0136|
|
||||
wincmd w
|
||||
argglobal
|
||||
if bufexists(fnamemodify("term://~/.config/nvim//1942532:/usr/bin/zsh;\#toggleterm\#1", ":p")) | buffer term://~/.config/nvim//1942532:/usr/bin/zsh;\#toggleterm\#1 | else | edit term://~/.config/nvim//1942532:/usr/bin/zsh;\#toggleterm\#1 | endif
|
||||
if &buftype ==# 'terminal'
|
||||
silent file term://~/.config/nvim//1942532:/usr/bin/zsh;\#toggleterm\#1
|
||||
endif
|
||||
balt lua/keybinds.lua
|
||||
setlocal foldmethod=marker
|
||||
setlocal foldexpr=0
|
||||
setlocal foldmarker={{{,}}}
|
||||
setlocal foldignore=#
|
||||
setlocal foldlevel=0
|
||||
setlocal foldminlines=1
|
||||
setlocal foldnestmax=20
|
||||
setlocal nofoldenable
|
||||
let s:l = 3 - ((2 * winheight(0) + 24) / 48)
|
||||
if s:l < 1 | let s:l = 1 | endif
|
||||
keepjumps exe s:l
|
||||
normal! zt
|
||||
keepjumps 3
|
||||
normal! 033|
|
||||
wincmd w
|
||||
exe 'vert 1resize ' . ((&columns * 30 + 106) / 212)
|
||||
exe 'vert 2resize ' . ((&columns * 90 + 106) / 212)
|
||||
exe 'vert 3resize ' . ((&columns * 90 + 106) / 212)
|
||||
tabnext 1
|
||||
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||
silent exe 'bwipe ' . s:wipebuf
|
||||
endif
|
||||
unlet! s:wipebuf
|
||||
set winheight=1 winwidth=20
|
||||
let &shortmess = s:shortmess_save
|
||||
let &winminheight = s:save_winminheight
|
||||
let &winminwidth = s:save_winminwidth
|
||||
let s:sx = expand("<sfile>:p:r")."x.vim"
|
||||
if filereadable(s:sx)
|
||||
exe "source " . fnameescape(s:sx)
|
||||
endif
|
||||
let &g:so = s:so_save | let &g:siso = s:siso_save
|
||||
set hlsearch
|
||||
nohlsearch
|
||||
doautoall SessionLoadPost
|
||||
unlet SessionLoad
|
||||
" vim: set ft=vim :
|
||||
@@ -1,43 +0,0 @@
|
||||
-- [[dynamicallt change kitty window opacity when opening and closing]]
|
||||
-- Define the target opacities
|
||||
local nvim_opacity = "0.85"
|
||||
local default_opacity = "0.6"
|
||||
-- Function to talk to Kitty
|
||||
local function set_kitty_opacity(opacity)
|
||||
-- Use os.execute to run the kitty remote command
|
||||
os.execute("kitty @ set-background-opacity " .. opacity)
|
||||
end
|
||||
-- Set up the autocommands
|
||||
local kitty_group = vim.api.nvim_create_augroup("KittyOpacity", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" }),
|
||||
vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE", ctermbg = "NONE" }),
|
||||
group = kitty_group,
|
||||
callback = function()
|
||||
set_kitty_opacity(nvim_opacity)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("VimLeave", {
|
||||
group = kitty_group,
|
||||
callback = function()
|
||||
set_kitty_opacity(default_opacity)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "toggleterm", "NvimTree", "help", "dashboard" },
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
@@ -1,17 +0,0 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
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)
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
-- lsp config
|
||||
require('lspconfig')
|
||||
local lsp_servers = {
|
||||
'clangd',
|
||||
'pyright',
|
||||
'bashls',
|
||||
'lua_ls',
|
||||
}
|
||||
for _, server in ipairs(lsp_servers) do
|
||||
local config = {}
|
||||
|
||||
-- Special settings for Lua
|
||||
if server == 'lua_ls' then
|
||||
config.settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
-- Tell the language server that 'vim' is a global
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
checkThirdParty = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
if server == 'bashls' then
|
||||
config.filetypes = { 'sh', 'bash', 'zsh' }
|
||||
end
|
||||
|
||||
-- Apply the config and enable
|
||||
vim.lsp.config(server, config)
|
||||
vim.lsp.enable(server)
|
||||
end
|
||||
-- highlight error messages
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
prefix = '■',
|
||||
spacing = 4,
|
||||
},
|
||||
-- Show signs in the gutter (left side)
|
||||
signs = true,
|
||||
-- Underline the actual code that has the error
|
||||
underline = true,
|
||||
-- Don't update diagnostics while typing (keeps it less distracting)
|
||||
update_in_insert = true,
|
||||
-- Better looking border for float windows
|
||||
float = { border = "rounded" },
|
||||
})
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
-- lua/custom-functions.lua
|
||||
-- A library file with custom functions for cleaner code elsewhere
|
||||
|
||||
local C = {}
|
||||
function C.RunCommand(Command)
|
||||
-- TODO IMplement an autocompiler function based on context
|
||||
local tt = require("toggleterm")
|
||||
local command = string.lower(Command)
|
||||
if command == "l" or command == "last" then tt.exec("clear && fc -e -\r") end
|
||||
if command == "c" or command == "compile" then tt.exec("clear && make\r") end
|
||||
vim.defer_fn(function ()
|
||||
vim.api.nvim_echo({
|
||||
{ "▶ Terminal: ", "WarningMsg" },
|
||||
{ "Running previous terminal command... ", "Normal" },
|
||||
}, true, {})
|
||||
end, 50)
|
||||
return ""
|
||||
end
|
||||
-- Save current layout snapshot
|
||||
-- vim.keymap.set("n", "<leader>ss", function()
|
||||
function C.saveSnapshot()
|
||||
vim.cmd("mksession! " .. vim.fn.stdpath("config") .. "/layout_snap.vim")
|
||||
print("Layout snapshot saved.")
|
||||
end
|
||||
|
||||
-- Restore layout snapshot
|
||||
-- vim.keymap.set("n", "<leader>sr", function()
|
||||
function C.returnSnapshot()
|
||||
local path = vim.fn.stdpath("config") .. "/layout_snap.vim"
|
||||
if vim.fn.filereadable(path) == 1 then
|
||||
vim.cmd("source " .. path)
|
||||
print("Layout snapshot restored.")
|
||||
else
|
||||
print("No layout snapshot found.")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return C
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
'tpope/vim-commentary',
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
'edluffy/hologram.nvim',
|
||||
auto_display = true, -- WIP automatic markdown image display, may be prone to breaking
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
{
|
||||
'soywod/iris.vim',
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
-- Plugin: NeogitOrg/neogit
|
||||
-- Installed via store.nvim
|
||||
|
||||
return {
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"sindrets/diffview.nvim", -- optional - Diff integration
|
||||
-- Only one of these is needed.
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
"nvim-mini/mini.pick", -- optional
|
||||
"folke/snacks.nvim" -- optional
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
{
|
||||
'obsidian-nvim/obsidian.nvim',
|
||||
},
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
return { -- syncronizes activity with Discord rich presence
|
||||
return {
|
||||
'andweeb/presence.nvim',
|
||||
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
|
||||
neovim_image_text = 'The One True Text Editor', -- Text displayed when hovered over the Neovim image
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
{
|
||||
'tpope/vim-commentary',
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
'0xm4n/resize.nvim',
|
||||
|
||||
keys = {
|
||||
-- Format: { 'key', 'command', desc = 'description', [opts]
|
||||
{ '<M-Left>', "<cmd>lua require('resize').ResizeLeft()<CR>", { silent = true } },
|
||||
{ '<M-Right>', "<cmd>lua require('resize').ResizeRight()<CR>", { silent = true } },
|
||||
{ '<M-Up>', "<cmd>lua require('resize').ResizeUp()<CR>", { silent = true } },
|
||||
{ '<M-Down>', "<cmd>lua require('resize').ResizeDown()<CR>", { silent = true } },
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
'alex-popov-tech/store.nvim',
|
||||
dependencies = { 'OXY2DEV/markview.nvim' },
|
||||
opts = {},
|
||||
cmd = 'Store',
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
'TamaMcGlinn/vim-termhere',
|
||||
}
|
||||
@@ -1,24 +1,21 @@
|
||||
return { -- adds a command to live view listed themes
|
||||
-- TODO dynamically update themes
|
||||
-- Plugin: zaldih/themery.nvim
|
||||
-- Installed via store.nvim
|
||||
|
||||
return {
|
||||
'zaldih/themery.nvim',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('themery').setup {
|
||||
themes = {
|
||||
'catppuccin-latte',
|
||||
'catppuccin-frappe',
|
||||
'catppuccin-macchiato',
|
||||
'catppuccin-mocha',
|
||||
'noctalia',
|
||||
'zellner',
|
||||
'zaibatsu',
|
||||
'wildcharm',
|
||||
'vim',
|
||||
'unokai',
|
||||
'torte',
|
||||
-- 'tokyonight-storm',
|
||||
-- 'tokyonight-night',
|
||||
-- 'tokyonight-day',
|
||||
'tokyonight-storm',
|
||||
'tokyonight-night',
|
||||
'tokyonight-day',
|
||||
'sorbet',
|
||||
'slate',
|
||||
'shine',
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
'vimpostor/vim-tpipeline',
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
{
|
||||
'michaeljsmith/vim-indent-object',
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
'kshenoy/vim-signature',
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
{
|
||||
'mg979/vim-visual-multi',
|
||||
},
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
--/lua/keybinds.lua
|
||||
-- This file defines all of the kybinds for nvim.
|
||||
-- Add these lines at the very top of your keymaps file
|
||||
vim.cmd('silent! unmapclear') -- Clears Normal, Visual, Select, and Operator-pending maps
|
||||
vim.cmd('silent! cmapclear') -- Clears Command-line maps
|
||||
vim.cmd('silent! imapclear') -- Clears Insert maps
|
||||
vim.cmd('silent! tmapclear') -- Clears Terminal maps
|
||||
|
||||
-- ==========================================
|
||||
-- Define your current keymaps below this line
|
||||
-- ==========================================
|
||||
package.loaded["custom-functions"] = nil
|
||||
local utils = require("custom-functions")
|
||||
|
||||
-- move betwwen buffers and tabs easier
|
||||
vim.keymap.set('n','<Tab>' ,':bnext<CR>')
|
||||
vim.keymap.set('n','<S-Tab>' ,':bprev<CR>')
|
||||
vim.keymap.set('n','<C-Tab>' ,':tabNext<CR>') --TODO fix these
|
||||
vim.keymap.set('n','<C-S-Tab>' ,':tabprevious<CR>')
|
||||
vim.keymap.set('n','<leader>tx' ,':tabclose<CR>')
|
||||
vim.keymap.set('n','<leader>tn' ,':tabnew<CR>')
|
||||
vim.keymap.set('n','<leader>bx' ,':bdelete<CR>')
|
||||
vim.keymap.set('n','<leader>x' ,':bdelete<CR>')
|
||||
-- resizing pains with resize.lua shortcut
|
||||
vim.keymap.set('n','<M-Left>' ,"<cmd>lua require('resize').ResizeLeft()<CR>")
|
||||
vim.keymap.set('n','<M-Right>' ,"<cmd>lua require('resize').ResizeRight()<CR>")
|
||||
vim.keymap.set('n','<M-Up>' ,"<cmd>lua require('resize').ResizeUp()<CR>")
|
||||
vim.keymap.set('n','<M-Down>' ,"<cmd>lua require('resize').ResizeDown()<CR>")
|
||||
-- terminal interface shortcuts
|
||||
vim.keymap.set('n','<Esc>' ,'<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('t','<Esc><Esc>' ,'<C-\\><C-n>' ,{ desc = 'Exit terminal mode' })
|
||||
vim.keymap.set('t','<C-h>' ,'<C-\\><C-n><C-w><C-h>' ,{ desc = 'Move focus to the left window' })
|
||||
-- vim.keymap.set('n','<leader>r' ,'<cmd>TermExec cmd="clear && make"<CR>' ,{ desc = '[r]un make in terminal' })
|
||||
vim.keymap.set('n','<leader>L' ,function() utils.RunCommand("l") end ,{ desc = 'run [l]ast command in terminal' })
|
||||
vim.keymap.set('n','<C-CR>' ,function() utils.RunCommand("l") end ,{ desc = 'run [l]ast command in terminal' })
|
||||
vim.keymap.set('n','<leader>ss' ,function() utils.saveSnapshot() end ,{ desc = '[S]ave a [S]napshot of the current windows' })
|
||||
vim.keymap.set('n','<leader>sr' ,function() utils.returnSnapshot() end ,{ desc = '[R]eturn to saved [S]napshot' })
|
||||
vim.keymap.set('n','<leader>n' ,'<cmd>ToggleTerm direction=vertical name=compile size=70<CR>', { desc = 'open a [n]ew terminal' })
|
||||
vim.keymap.set('n','<leader>te' ,'<cmd>ToggleTerm<CR>' ,{desc = '[T]oggle all terminals'})
|
||||
vim.keymap.set("n","<leader>e" ,"<cmd>NvimTreeToggle<CR>" ,{desc = 'open [E]xplorer'})
|
||||
vim.keymap.set("n","<leader>E" ,"<cmd>e!<CR>" ,{desc = '[E]dit current file from disk'})
|
||||
vim.keymap.set("n","<M-r>" ,"<cmd>e!<CR>" ,{desc = '[E]dit current file from disk'})
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q' ,vim.diagnostic.setloclist ,{ desc = 'Open diagnostic [Q]uickfix list' })
|
||||
vim.keymap.set("n", "<leader>R" ,"<cmd>source %<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[S]ource config file"})
|
||||
vim.keymap.set("n", "<leader><C-R>k" ,"<cmd>source /home/venus/.config/nvim/lua/keybinds.lua<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[R]eload [k]eybinds"})
|
||||
vim.keymap.set("n", "<leader><C-R>c" ,"<cmd>source /home/venus/.config/nvim/lua/autocommands.lua<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[R]eload [a]utocommands"})
|
||||
vim.keymap.set("n", "<leader><C-R>o" ,"<cmd>source /home/venus/.config/nvim/lua/options.lua<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[R]eload [o]ptions"})
|
||||
-- LSP functions
|
||||
vim.keymap.set('n', 'gd' ,vim.lsp.buf.definition, { desc = "LSP Go to Definition" })
|
||||
vim.keymap.set('n', 'gr' ,'<cmd>Telescope lsp_references<cr>' ,{ desc = "LSP [R]eferences" })
|
||||
vim.keymap.set('n', 'gi' ,'<cmd>Telescope lsp_implementations<cr>' ,{ desc = "LSP [I]mplementations" })
|
||||
vim.keymap.set('n', 'gs' ,'<cmd>Telescope lsp_document_symbols<cr>' ,{ desc = "LSP Document [S]ymbols" })
|
||||
vim.keymap.set('n', 'sk' ,'<cmd>Telescope keymaps<cr>' ,{ desc = "[S]earch [K]eymaps" })
|
||||
vim.keymap.set('n', 'sd' ,'<cmd>Telescope diagnostics<cr>' ,{ desc = "[S]earch [D]iagnostics" })
|
||||
vim.keymap.set('n', 'sw' ,'<cmd>Telescope grep_string<cr>' ,{ desc = "[S]earch current [W]ord" })
|
||||
vim.keymap.set('n', '<leader>ff' ,'<cmd>Telescope find_files<cr>' ,{ desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg' ,'<cmd>Telescope live_grep<cr>' ,{ desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb' ,'<cmd>Telescope buffers<cr>' ,{ desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh' ,'<cmd>Telescope help_tags<cr>' ,{ desc = 'Telescope help tags' })
|
||||
vim.keymap.set('n', '<leader>tt' ,'<cmd>Telescope<cr>' ,{ desc = 'Open [T]elescope' })
|
||||
|
||||
-- Disable arrow keys in normal mode
|
||||
vim.keymap.set('n','<left>' ,'<cmd>echo "Use h to move!!"<CR>')
|
||||
vim.keymap.set('n','<right>' ,'<cmd>echo "Use l to move!!"<CR>')
|
||||
vim.keymap.set('n','<up>' ,'<cmd>echo "Use k to move!!"<CR>')
|
||||
vim.keymap.set('n','<down>' ,'<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
-- See `:help wincmd` for a list of all window commands
|
||||
vim.keymap.set('n','<C-h>' ,'<C-w><C-h>' ,{ desc = 'Move focus to the left window' })
|
||||
vim.keymap.set('n','<C-l>' ,'<C-w><C-l>' ,{ desc = 'Move focus to the right window' })
|
||||
vim.keymap.set('n','<C-j>' ,'<C-w><C-j>' ,{ desc = 'Move focus to the lower window' })
|
||||
vim.keymap.set('n','<C-k>' ,'<C-w><C-k>' ,{ desc = 'Move focus to the upper window' })
|
||||
|
||||
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
|
||||
vim.keymap.set("n","<C-S-h>" ,"<C-w>H" ,{ desc = "Move window to the left" })
|
||||
vim.keymap.set("n","<C-S-l>" ,"<C-w>L" ,{ desc = "Move window to the right" })
|
||||
vim.keymap.set("n","<C-S-j>" ,"<C-w>J" ,{ desc = "Move window to the lower" })
|
||||
vim.keymap.set("n","<C-S-k>" ,"<C-w>K" ,{ desc = "Move window to the upper" })
|
||||
|
||||
-- [[ Basic QOL
|
||||
vim.keymap.set("n", "<leader>rn" ,":IncRename " ,{ desc = '[R]e[n]ame variable under cursor'})
|
||||
vim.keymap.set('n', '<leader>I' ,'<cmd>GuessIndent<cr>' ,{ desc = '[G]uess Indent level' })
|
||||
vim.keymap.set("n", "<leader>i" ,"m'gg=G''" ,{ desc = "Re-indent whole file" })
|
||||
vim.keymap.set("n", "<leader>y" ,"m'ggyG''" ,{ desc = "[Y]ank whole file" })
|
||||
vim.keymap.set("n", "<C-A>" ,"m'ggyG''" ,{ desc = "[Y]ank whole file" })
|
||||
vim.keymap.set("n", "<leader>sr" ,[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]] ,{ desc = "[S]earch/[R]eplace word under cursor" })
|
||||
|
||||
-- PLUGIN KEYBINDS
|
||||
-- TODO move these to their respective plugin files (for lazy recognition)
|
||||
|
||||
--spellcheck keybind to toggle on current buffer
|
||||
vim.keymap.set('n',"<leader>ze" ,"<cmd>setlocal spell<cr>" ,{ desc = "enable spellecheck on buffer" })
|
||||
vim.keymap.set('n',"<leader>zd" ,"<cmd>setlocal nospell<cr>" ,{ desc = "Disable spellecheck on buffer" })
|
||||
|
||||
--Hex Editing
|
||||
vim.keymap.set('n', '<leader>hh' ,'<cmd>Hex<CR>' ,{ desc = 'open [H]ex view of a file' })
|
||||
|
||||
--Neogit
|
||||
-- <leader>gg bound to UI toggle
|
||||
vim.keymap.set('n', '<leader>gg' ,'<cmd>Neogit<cr>' ,{ desc = 'open Neo[g]it interface' })
|
||||
vim.keymap.set('n', '<leader>gc' ,'<cmd>Neogit commit<cr>' ,{ desc = 'open Neogit [c]ommit page' })
|
||||
vim.keymap.set('n', '<leader>gd' ,'<cmd>Neogit diff<cr>' ,{ desc = 'open Neogit [d]iff page' })
|
||||
vim.keymap.set('n', '<leader>gt' ,'<cmd>Neogit tagg<cr>' ,{ desc = 'open Neogit [t]agg page' })
|
||||
|
||||
-- Obsidian
|
||||
vim.keymap.set("n", "gf", function()
|
||||
if require("obsidian").util.cursor_on_markdown_link() then
|
||||
return "ObsidianFollowLink"
|
||||
else
|
||||
return "gf"
|
||||
end
|
||||
end, { expr = true, desc = "Follow Obsidian link" })
|
||||
|
||||
vim.keymap.set("n", "<leader>os" , "ObsidianSearch" , { desc = "Search Obsidian" })
|
||||
vim.keymap.set("n", "<leader>on" , "ObsidianNew" , { desc = "New Obsidian note" })
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
--[[
|
||||
--
|
||||
-- This file is not required for your own configuration,
|
||||
-- but helps people determine if their system is setup correctly.
|
||||
--
|
||||
--]]
|
||||
|
||||
local check_version = function()
|
||||
local verstr = tostring(vim.version())
|
||||
if not vim.version.ge then
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
return
|
||||
end
|
||||
|
||||
if vim.version.ge(vim.version(), '0.10-dev') then
|
||||
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
|
||||
else
|
||||
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
|
||||
end
|
||||
end
|
||||
|
||||
local check_external_reqs = function()
|
||||
-- Basic utils: `git`, `make`, `unzip`
|
||||
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
||||
local is_executable = vim.fn.executable(exe) == 1
|
||||
if is_executable then
|
||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||
else
|
||||
vim.health.warn(string.format("Could not find executable: '%s'", exe))
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
return {
|
||||
check = function()
|
||||
vim.health.start 'kickstart.nvim'
|
||||
|
||||
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
|
||||
|
||||
Fix only warnings for plugins and languages you intend to use.
|
||||
Mason will give warnings for languages that are not installed.
|
||||
You do not need to install, unless you want to use those languages!]]
|
||||
|
||||
local uv = vim.uv or vim.loop
|
||||
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
|
||||
|
||||
check_version()
|
||||
check_external_reqs()
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
-- autopairs
|
||||
-- https://github.com/windwp/nvim-autopairs
|
||||
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts = {},
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
-- debug.lua
|
||||
--
|
||||
-- Shows how to use the DAP plugin to debug your code.
|
||||
--
|
||||
-- Primarily focused on configuring the debugger for Go, but can
|
||||
-- be extended to other languages as well. That's why it's called
|
||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||
|
||||
return {
|
||||
-- NOTE: Yes, you can install new plugins here!
|
||||
'mfussenegger/nvim-dap',
|
||||
-- NOTE: And you can specify dependencies as well
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
|
||||
-- Required dependency for nvim-dap-ui
|
||||
'nvim-neotest/nvim-nio',
|
||||
|
||||
-- Installs the debug adapters for you
|
||||
'mason-org/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
-- Add your own debuggers here
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
keys = {
|
||||
-- Basic debugging keymaps, feel free to change to your liking!
|
||||
{
|
||||
'<F5>',
|
||||
function()
|
||||
require('dap').continue()
|
||||
end,
|
||||
desc = 'Debug: Start/Continue',
|
||||
},
|
||||
{
|
||||
'<F1>',
|
||||
function()
|
||||
require('dap').step_into()
|
||||
end,
|
||||
desc = 'Debug: Step Into',
|
||||
},
|
||||
{
|
||||
'<F2>',
|
||||
function()
|
||||
require('dap').step_over()
|
||||
end,
|
||||
desc = 'Debug: Step Over',
|
||||
},
|
||||
{
|
||||
'<F3>',
|
||||
function()
|
||||
require('dap').step_out()
|
||||
end,
|
||||
desc = 'Debug: Step Out',
|
||||
},
|
||||
{
|
||||
'<leader>b',
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end,
|
||||
desc = 'Debug: Toggle Breakpoint',
|
||||
},
|
||||
{
|
||||
'<leader>B',
|
||||
function()
|
||||
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end,
|
||||
desc = 'Debug: Set Breakpoint',
|
||||
},
|
||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||
{
|
||||
'<F7>',
|
||||
function()
|
||||
require('dapui').toggle()
|
||||
end,
|
||||
desc = 'Debug: See last session result.',
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
-- Makes a best effort to setup the various debuggers with
|
||||
-- reasonable debug configurations
|
||||
automatic_installation = true,
|
||||
|
||||
-- You can provide additional configuration to the handlers,
|
||||
-- see mason-nvim-dap README for more information
|
||||
handlers = {},
|
||||
|
||||
-- You'll need to check that you have the required things installed
|
||||
-- online, please don't ask me how to install them :)
|
||||
ensure_installed = {
|
||||
-- Update this to ensure that you have the debuggers for the langs you want
|
||||
'delve',
|
||||
},
|
||||
}
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
dapui.setup {
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
-- Feel free to remove or use ones that you like more! :)
|
||||
-- Don't feel like these are good choices.
|
||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = '⏸',
|
||||
play = '▶',
|
||||
step_into = '⏎',
|
||||
step_over = '⏭',
|
||||
step_out = '⏮',
|
||||
step_back = 'b',
|
||||
run_last = '▶▶',
|
||||
terminate = '⏹',
|
||||
disconnect = '⏏',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Change breakpoint icons
|
||||
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
|
||||
-- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
|
||||
-- local breakpoint_icons = vim.g.have_nerd_font
|
||||
-- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
|
||||
-- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
|
||||
-- for type, icon in pairs(breakpoint_icons) do
|
||||
-- local tp = 'Dap' .. type
|
||||
-- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
|
||||
-- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
|
||||
-- end
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
require('dap-go').setup {
|
||||
delve = {
|
||||
-- On Windows delve must be run attached or it crashes.
|
||||
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||
detached = vim.fn.has 'win32' == 0,
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
-- NOTE: gitsigns is already included in init.lua but contains only the base
|
||||
-- config. This will add also the recommended keymaps.
|
||||
|
||||
return {
|
||||
{
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
on_attach = function(bufnr)
|
||||
local gitsigns = require 'gitsigns'
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
-- Navigation
|
||||
map('n', ']c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal { ']c', bang = true }
|
||||
else
|
||||
gitsigns.nav_hunk 'next'
|
||||
end
|
||||
end, { desc = 'Jump to next git [c]hange' })
|
||||
|
||||
map('n', '[c', function()
|
||||
if vim.wo.diff then
|
||||
vim.cmd.normal { '[c', bang = true }
|
||||
else
|
||||
gitsigns.nav_hunk 'prev'
|
||||
end
|
||||
end, { desc = 'Jump to previous git [c]hange' })
|
||||
|
||||
-- Actions
|
||||
-- visual mode
|
||||
map('v', '<leader>hs', function()
|
||||
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||
end, { desc = 'git [s]tage hunk' })
|
||||
map('v', '<leader>hr', function()
|
||||
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
|
||||
end, { desc = 'git [r]eset hunk' })
|
||||
-- normal mode
|
||||
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
|
||||
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
|
||||
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
|
||||
map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' })
|
||||
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
|
||||
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
|
||||
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
|
||||
map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
|
||||
map('n', '<leader>hD', function()
|
||||
gitsigns.diffthis '@'
|
||||
end, { desc = 'git [D]iff against last commit' })
|
||||
-- Toggles
|
||||
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
|
||||
map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
{ -- Add indentation guides even on blank lines
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||
-- See `:help ibl`
|
||||
main = 'ibl',
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
return {
|
||||
|
||||
{ -- Linting
|
||||
'mfussenegger/nvim-lint',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
config = function()
|
||||
local lint = require 'lint'
|
||||
lint.linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
-- instead set linters_by_ft like this:
|
||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||
--
|
||||
-- However, note that this will enable a set of default linters,
|
||||
-- which will cause errors unless these tools are available:
|
||||
-- {
|
||||
-- clojure = { "clj-kondo" },
|
||||
-- dockerfile = { "hadolint" },
|
||||
-- inko = { "inko" },
|
||||
-- janet = { "janet" },
|
||||
-- json = { "jsonlint" },
|
||||
-- markdown = { "vale" },
|
||||
-- rst = { "vale" },
|
||||
-- ruby = { "ruby" },
|
||||
-- terraform = { "tflint" },
|
||||
-- text = { "vale" }
|
||||
-- }
|
||||
--
|
||||
-- You can disable the default linters by setting their filetypes to nil:
|
||||
-- lint.linters_by_ft['clojure'] = nil
|
||||
-- lint.linters_by_ft['dockerfile'] = nil
|
||||
-- lint.linters_by_ft['inko'] = nil
|
||||
-- lint.linters_by_ft['janet'] = nil
|
||||
-- lint.linters_by_ft['json'] = nil
|
||||
-- lint.linters_by_ft['markdown'] = nil
|
||||
-- lint.linters_by_ft['rst'] = nil
|
||||
-- lint.linters_by_ft['ruby'] = nil
|
||||
-- lint.linters_by_ft['terraform'] = nil
|
||||
-- lint.linters_by_ft['text'] = nil
|
||||
|
||||
-- Create autocommand which carries out the actual linting
|
||||
-- on the specified events.
|
||||
local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
-- Only run the linter in buffers that you can modify in order to
|
||||
-- avoid superfluous noise, notably within the handy LSP pop-ups that
|
||||
-- describe the hovered symbol using Markdown.
|
||||
if vim.bo.modifiable then
|
||||
lint.try_lint()
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
-- Neo-tree is a Neovim plugin to browse the file system
|
||||
-- https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
version = '*',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
lazy = false,
|
||||
keys = {
|
||||
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
|
||||
},
|
||||
opts = {
|
||||
filesystem = {
|
||||
window = {
|
||||
mappings = {
|
||||
['\\'] = 'close_window',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
require('base16-colorscheme').setup {
|
||||
-- Background tones
|
||||
base00 = '{{colors.surface.default.hex}}', -- Default Background
|
||||
base01 = '{{colors.surface_container.default.hex}}', -- Lighter Background (status bars)
|
||||
base02 = '{{colors.surface_container_high.default.hex}}', -- Selection Background
|
||||
base03 = '{{colors.outline.default.hex}}', -- Comments, Invisibles
|
||||
-- Foreground tones
|
||||
base04 = '{{colors.on_surface_variant.default.hex}}', -- Dark Foreground (status bars)
|
||||
base05 = '{{colors.on_surface.default.hex}}', -- Default Foreground
|
||||
base06 = '{{colors.on_surface.default.hex}}', -- Light Foreground
|
||||
base07 = '{{colors.on_background.default.hex}}', -- Lightest Foreground
|
||||
-- Accent colors
|
||||
base08 = '{{colors.error.default.hex}}', -- Variables, XML Tags, Errors
|
||||
base09 = '{{colors.tertiary.default.hex}}', -- Integers, Constants
|
||||
base0A = '{{colors.secondary.default.hex}}', -- Classes, Search Background
|
||||
base0B = '{{colors.primary.default.hex}}', -- Strings, Diff Inserted
|
||||
base0C = '{{colors.tertiary_fixed_dim.default.hex}}', -- Regex, Escape Chars
|
||||
base0D = '{{colors.primary_fixed_dim.default.hex}}', -- Functions, Methods
|
||||
base0E = '{{colors.secondary_fixed_dim.default.hex}}', -- Keywords, Storage
|
||||
base0F = '{{colors.error_container.default.hex}}', -- Deprecated, Embedded Tags
|
||||
}
|
||||
end
|
||||
|
||||
-- Register a signal handler for SIGUSR1 (matugen updates)
|
||||
local signal = vim.uv.new_signal()
|
||||
signal:start(
|
||||
'sigusr1',
|
||||
vim.schedule_wrap(function()
|
||||
package.loaded['matugen'] = nil
|
||||
require('matugen').setup()
|
||||
end)
|
||||
)
|
||||
|
||||
return M
|
||||
@@ -1,37 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
function M.setup()
|
||||
require('base16-colorscheme').setup {
|
||||
-- Background tones
|
||||
base00 = '#191724', -- Default Background
|
||||
base01 = '#26233a', -- Lighter Background (status bars)
|
||||
base02 = '#2e2b47', -- Selection Background
|
||||
base03 = '#656278', -- Comments, Invisibles
|
||||
-- Foreground tones
|
||||
base04 = '#908caa', -- Dark Foreground (status bars)
|
||||
base05 = '#e0def4', -- Default Foreground
|
||||
base06 = '#e0def4', -- Light Foreground
|
||||
base07 = '#e0def4', -- Lightest Foreground
|
||||
-- Accent colors
|
||||
base08 = '#eb6f92', -- Variables, XML Tags, Errors
|
||||
base09 = '#31748f', -- Integers, Constants
|
||||
base0A = '#9ccfd8', -- Classes, Search Background
|
||||
base0B = '#ebbcba', -- Strings, Diff Inserted
|
||||
base0C = '#96d1e9', -- Regex, Escape Chars
|
||||
base0D = '#e99996', -- Functions, Methods
|
||||
base0E = '#96dce9', -- Keywords, Storage
|
||||
base0F = '#961137', -- Deprecated, Embedded Tags
|
||||
}
|
||||
end
|
||||
|
||||
-- Register a signal handler for SIGUSR1 (matugen updates)
|
||||
local signal = vim.uv.new_signal()
|
||||
signal:start(
|
||||
'sigusr1',
|
||||
vim.schedule_wrap(function()
|
||||
package.loaded['matugen'] = nil
|
||||
require('matugen').setup()
|
||||
end)
|
||||
)
|
||||
|
||||
return M
|
||||
@@ -1,67 +0,0 @@
|
||||
-- /lua/options.lua
|
||||
-- This file is where i set all of the options and settings for nvim
|
||||
|
||||
|
||||
-- [[setup]]
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
vim.g.have_nerd_font = true
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- [[Setting options]]
|
||||
vim.o.spell = false -- turn on spellcheck
|
||||
vim.o.spelllang = 'en_us' -- set English as spellcheck language
|
||||
vim.opt.spellcapcheck = ""
|
||||
vim.o.number = true -- Make line numbers default
|
||||
vim.o.relativenumber = true
|
||||
vim.o.showmode = false
|
||||
vim.o.foldmethod = "expr"
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
-- See `:help 'clipboard'`
|
||||
vim.schedule(function()
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
end)
|
||||
-- Enable break indent
|
||||
-- Save undo history
|
||||
vim.o.undofile = true
|
||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
-- Keep signcolumn on by default
|
||||
vim.o.signcolumn = 'yes'
|
||||
-- Decrease update time
|
||||
vim.o.updatetime = 250
|
||||
-- Decrease mapped sequence wait time
|
||||
vim.o.timeoutlen = 300
|
||||
-- Configure how new splits should be opened
|
||||
vim.o.splitright = true
|
||||
vim.o.splitbelow = true
|
||||
vim.o.list = true
|
||||
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
||||
-- Preview substitutions live, as you type!
|
||||
vim.o.inccommand = 'split'
|
||||
-- Show which line your cursor is on
|
||||
vim.o.cursorline = true
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
vim.o.scrolloff = 25
|
||||
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
||||
-- instead raise a dialog asking if you wish to save the current file(s)
|
||||
-- See `:help 'confirm'`
|
||||
vim.o.confirm = true
|
||||
|
||||
-- vim.opt.expandtab = false -- Do NOT turn tabs into spaces
|
||||
-- vim.opt.tabstop = 4 -- A literal \t character looks 4 columns wide
|
||||
-- vim.opt.shiftwidth = 4 -- Number of spaces for automated indentation (<< or >>)
|
||||
-- vim.opt.softtabstop = 0 -- Let the backspace key delete a full hard tab
|
||||
|
||||
vim.opt.termguicolors = true -- required for colorizer
|
||||
|
||||
--set background color on entering and leaving nvim
|
||||
require('autocommands')
|
||||
vim.env.PATH = vim.fn.stdpath("data") .. "/mason/bin" .. ":" .. vim.env.PATH
|
||||
|
||||
vim.g.python3_host_prog = vim.fn.expand("~/.local/share/nvim/venv/bin/python")
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
return { 'RRethy/base16-nvim',
|
||||
config = function()
|
||||
local ok, matugen = pcall(require, 'matugen')
|
||||
if ok then matugen.setup() end
|
||||
end,
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
return {
|
||||
"olimorris/codecompanion.nvim",
|
||||
version = "^19.0.0",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
acp = {
|
||||
hermes = function()
|
||||
local adapter = require("codecompanion.adapters").extend("codex", {
|
||||
name = "hermes",
|
||||
formatted_name = "Hermes",
|
||||
commands = {
|
||||
default = {
|
||||
vim.fn.exepath("hermes") ~= "" and vim.fn.exepath("hermes") or "hermes",
|
||||
"acp",
|
||||
},
|
||||
},
|
||||
defaults = {
|
||||
auth_method = "openai-codex",
|
||||
timeout = 20000,
|
||||
mcpServers = {},
|
||||
},
|
||||
})
|
||||
|
||||
-- Hermes resolves credentials from its own configuration.
|
||||
adapter.env = {}
|
||||
return adapter
|
||||
end,
|
||||
extend = {
|
||||
codex = {
|
||||
defaults = {
|
||||
auth_method = "chat-gpt",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
http = {
|
||||
extend = {
|
||||
openai_responses = {
|
||||
schema = {
|
||||
model = {
|
||||
default = "gpt-5.6-terra",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
openai_terra = function()
|
||||
return require("codecompanion.adapters").extend("openai_responses", {
|
||||
name = "openai_terra",
|
||||
formatted_name = "OpenAI: GPT-5.6 Terra",
|
||||
schema = {
|
||||
model = {
|
||||
default = "gpt-5.6-terra",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
openai_luna = function()
|
||||
return require("codecompanion.adapters").extend("openai_responses", {
|
||||
name = "openai_luna",
|
||||
formatted_name = "OpenAI: GPT-5.6 Luna",
|
||||
schema = {
|
||||
model = {
|
||||
default = "gpt-5.6-luna",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
interactions = {
|
||||
chat = {
|
||||
adapter = "hermes",
|
||||
},
|
||||
inline = {
|
||||
adapter = {
|
||||
name = "openai_responses",
|
||||
model = "gpt-5.6-terra",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
suggestion = {
|
||||
enabled = false,
|
||||
-- debounce = 150,
|
||||
-- auto_trigger = true,
|
||||
-- keymap = { accept = "M-CR"}
|
||||
},
|
||||
panel = { enabled = false },
|
||||
},
|
||||
},
|
||||
{ "giuxtaposition/blink-cmp-copilot", dependencies = { "zbirenbaum/copilot.lua" } }
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
return {
|
||||
'nvimdev/dashboard-nvim',
|
||||
event = 'VimEnter',
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('dashboard').setup(
|
||||
{
|
||||
theme = 'hyper',
|
||||
config = {
|
||||
week_header = {
|
||||
enable = true,
|
||||
},
|
||||
project = {
|
||||
enable = false,
|
||||
},
|
||||
shortcut = {
|
||||
{ desc = ' Update', group = '@property', action = 'Lazy update', key = 'u' },
|
||||
{
|
||||
icon = ' ',
|
||||
icon_hl = '@variable',
|
||||
desc = 'Files',
|
||||
group = 'Label',
|
||||
action = 'Telescope find_files',
|
||||
key = 'f',
|
||||
},
|
||||
{
|
||||
desc = ' file manager',
|
||||
group = 'Label',
|
||||
action = 'NvimTreeOpen',
|
||||
key = 'e',
|
||||
},
|
||||
{
|
||||
icon = '',
|
||||
desc = ' Quit',
|
||||
group = 'Label',
|
||||
action = 'quitall',
|
||||
key = 'q',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
dependencies = { {'nvim-tree/nvim-web-devicons'}}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
return {
|
||||
-- "John-Bush14/neoburner",
|
||||
-- config = function()
|
||||
-- require("neoburner").setup({
|
||||
-- -- needed
|
||||
-- filesystem = "/home/venus/code/bitburner/", -- where bitburner filesystem will be placed
|
||||
-- -- optional
|
||||
|
||||
-- address = "ws://localhost", -- localhost
|
||||
|
||||
-- port = 12525,
|
||||
-- servers = {"home"}, -- servers wich will be in filesystem, cannot be set to "*" because of api limitations.
|
||||
-- root_server = "home", -- or nil
|
||||
-- servers_folder = "servers", -- or nil
|
||||
-- })
|
||||
-- end
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
return { -- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
return {
|
||||
'NMAC427/guess-indent.nvim',
|
||||
config = function()
|
||||
require('guess-indent').setup {
|
||||
auto_cmd = true, -- Set to false to disable automatic execution
|
||||
filetype_exclude = { 'netrw', 'tutor' }, -- A list of filetypes for which the auto command gets disabled
|
||||
buftype_exclude = { 'help', 'nofile', 'terminal', 'prompt' }, -- A list of buffer types for which the auto command gets disabled
|
||||
}
|
||||
end,
|
||||
} -- Detect tabstop and shiftwidth automatically
|
||||
@@ -1,24 +0,0 @@
|
||||
return {
|
||||
"3rd/image.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
backend = "kitty",
|
||||
processor = "magick_cli", -- Uses your system's ImageMagick CLI directly
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true,
|
||||
clear_in_insert_mode = false,
|
||||
download_remote_images = true,
|
||||
only_render_image_at_cursor = false,
|
||||
},
|
||||
},
|
||||
max_width = nil,
|
||||
max_height = nil,
|
||||
max_height_window_percentage = math.huge,
|
||||
max_width_window_percentage = math.huge,
|
||||
window_overlap_clear_enabled = true,
|
||||
-- Automatically hijack and render PDF files inside Neovim buffers
|
||||
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.pdf" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
cmd = { "Trouble" },
|
||||
opts = {
|
||||
modes = {
|
||||
lsp = {
|
||||
win = { position = "right" },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
||||
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
||||
{ "<leader>cs", "<cmd>Trouble symbols toggle<cr>", desc = "Symbols (Trouble)" },
|
||||
{ "<leader>cS", "<cmd>Trouble lsp toggle<cr>", desc = "LSP references/definitions/... (Trouble)" },
|
||||
{ "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)" },
|
||||
{ "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)" },
|
||||
{
|
||||
"[q",
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").prev({ skip_groups = true, jump = true })
|
||||
else
|
||||
local ok, err = pcall(vim.cmd.cprev)
|
||||
if not ok then
|
||||
vim.notify(err, vim.log.levels.ERROR)
|
||||
end
|
||||
end
|
||||
end,
|
||||
desc = "Previous Trouble/Quickfix Item",
|
||||
},
|
||||
{
|
||||
"]q",
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").next({ skip_groups = true, jump = true })
|
||||
else
|
||||
local ok, err = pcall(vim.cmd.cnext)
|
||||
if not ok then
|
||||
vim.notify(err, vim.log.levels.ERROR)
|
||||
end
|
||||
end
|
||||
end,
|
||||
desc = "Next Trouble/Quickfix Item",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
return { -- adds lsp functionality and api for included languages
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
{ "mason-org/mason.nvim", config = true }, -- The "App Store"
|
||||
{ "mason-org/mason-lspconfig.nvim", config = true }, -- The "Bridge"
|
||||
{
|
||||
'saghen/blink.cmp',
|
||||
version = '*', -- Downloads pre-built binaries (fast!)
|
||||
opts =
|
||||
{
|
||||
keymap = {
|
||||
preset = 'none',
|
||||
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
['<C-e>'] = { 'hide', 'fallback' },
|
||||
-- Use home-row modifications for navigation
|
||||
['<C-n>'] = { 'select_next', 'fallback' },
|
||||
['<C-p>'] = { 'select_prev', 'fallback' },
|
||||
-- A robust Tab behavior that accepts selections and jumps through snippets
|
||||
['<Tab>'] = {
|
||||
function(cmp)
|
||||
if cmp.is_visible() then return cmp.accept() end
|
||||
if cmp.snippet_active() then return cmp.snippet_forward() end
|
||||
end,
|
||||
'fallback'
|
||||
},
|
||||
['<S-Tab>'] = {
|
||||
function(cmp)
|
||||
if cmp.snippet_active() then return cmp.snippet_backward() end
|
||||
end,
|
||||
'fallback'
|
||||
},
|
||||
},
|
||||
-- keymap = {
|
||||
-- preset = 'none',
|
||||
-- ['<Down>'] = { 'select_next', 'fallback' },
|
||||
-- ['<Up>'] = { 'select_prev', 'fallback' },
|
||||
-- ['<Tab>'] = { 'accept', 'fallback' },
|
||||
-- ['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
-- },
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer', 'copilot' },
|
||||
providers = {
|
||||
copilot = { name = 'copilot', module = 'blink-cmp-copilot', score_offset = 100, async = true }
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
ghost_text = { enabled = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite
|
||||
---@module 'render-markdown'
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require('lspconfig')
|
||||
-- Since you are using blink.cmp, extract its capabilities
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
|
||||
-- Configure OmniSharp for C# / nanoFramework development
|
||||
lspconfig.omnisharp.setup({
|
||||
capabilities = capabilities,
|
||||
cmd = { "omnisharp" },
|
||||
settings = {
|
||||
FormattingOptions = {
|
||||
EnableEditorConfigSupport = true,
|
||||
},
|
||||
MsBuild = {
|
||||
LoadProjectsOnDemand = false,
|
||||
},
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
local opts = { buffer = bufnr, remap = false }
|
||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set("n", "<leader>ca", function() vim.lsp.buf.code_action() end, opts)
|
||||
end,
|
||||
})
|
||||
end
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- Only load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
-- always load the LazyVim library
|
||||
"LazyVim",
|
||||
-- Only load the lazyvim library when the `LazyVim` global is found
|
||||
{ path = "LazyVim", words = { "LazyVim" } },
|
||||
-- Load the wezterm types when the `wezterm` module is required
|
||||
-- Needs `DrKJeff16/wezterm-types` to be installed
|
||||
{ path = "wezterm-types", mods = { "wezterm" } },
|
||||
-- Load the xmake types when opening file named `xmake.lua`
|
||||
-- Needs `LelouchHe/xmake-luals-addon` to be installed
|
||||
{ path = "xmake-luals-addon/library", files = { "xmake.lua" } },
|
||||
},
|
||||
-- disable when a .luarc.json file is found
|
||||
enabled = function(root_dir)
|
||||
return not vim.uv.fs_stat(root_dir .. "/.luarc.json")
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
return { -- adds more detailed bar below the pane
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
refresh_time = 16, -- ~60fps
|
||||
events = {
|
||||
'WinEnter',
|
||||
'BufEnter',
|
||||
'BufWritePost',
|
||||
'SessionLoadPost',
|
||||
'FileChangedShellPost',
|
||||
'VimResized',
|
||||
'Filetype',
|
||||
'CursorMoved',
|
||||
'CursorMovedI',
|
||||
'ModeChanged',
|
||||
},
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode', 'lsp_status'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
-- lualine_d = {'tabs', 'windows'},
|
||||
lualine_x = {'searchcount', 'selectioncount', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress', 'location'},
|
||||
lualine_z = {{'datetime', style = "%m/%d %H:%M"}}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {
|
||||
-- lualine_a = {'filename'}
|
||||
},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {}
|
||||
}
|
||||
end
|
||||
},
|
||||
{
|
||||
'akinsho/bufferline.nvim',
|
||||
version = "*",
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
local bufferline = require('bufferline')
|
||||
bufferline.setup{
|
||||
options = {
|
||||
themable = true,
|
||||
numbers = "buffer_id",
|
||||
indicator = {
|
||||
icon = '▎', -- this should be omitted if indicator style is not 'icon'
|
||||
style = 'icon',
|
||||
},
|
||||
buffer_close_icon = '',
|
||||
modified_icon = '● ',
|
||||
close_icon = ' ',
|
||||
left_trunc_marker = ' ',
|
||||
right_trunc_marker = ' ',
|
||||
diagnostics = "nvim_lsp",
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
return { -- Collection of various small independent plugins/modules
|
||||
{
|
||||
'echasnovski/mini.nvim',
|
||||
config = function()
|
||||
-- Better Around/Inside textobjects
|
||||
--
|
||||
-- Examples:
|
||||
-- - va) - [V]isually select [A]round [)]paren
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||
-- - ci' - [C]hange [I]nside [']quote
|
||||
require('mini.ai').setup { n_lines = 500 }
|
||||
|
||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
--
|
||||
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||
-- - sd' - [S]urround [D]elete [']quotes
|
||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||
require('mini.surround').setup()
|
||||
|
||||
require('mini.cursorword').setup()
|
||||
|
||||
require('mini.indentscope').setup {draw = {delay = 30 }}
|
||||
|
||||
require('mini.map').setup()
|
||||
|
||||
require('mini.tabline').setup()
|
||||
|
||||
require('mini.move').setup()
|
||||
|
||||
require('mini.clue').setup()
|
||||
|
||||
end,
|
||||
},
|
||||
{
|
||||
'folke/snacks.nvim',
|
||||
config = function()
|
||||
require("snacks").setup({
|
||||
image = {
|
||||
enabled = true,
|
||||
-- This ensures that when you open an image file, it renders
|
||||
-- You can also toggle it manually with :SnacksImage
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
return { -- add git tui functionality
|
||||
"NeogitOrg/neogit",
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"sindrets/diffview.nvim", -- optional - Diff integration
|
||||
|
||||
-- Only one of these is needed.
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
"nvim-mini/mini.pick", -- optional
|
||||
"folke/snacks.nvim", -- optional
|
||||
},
|
||||
cmd = "Neogit",
|
||||
keys = {
|
||||
{ "<leader>gg", "<cmd>Neogit<cr>", desc = "Show Neogit UI" }
|
||||
},
|
||||
config = function()
|
||||
local ng = require("neogit")
|
||||
ng.setup({
|
||||
kind = "floating",
|
||||
commit_editor = {
|
||||
kind = "floating",
|
||||
stages_diff_split_kind = "split"
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
return {
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-neotest/nvim-nio",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-neotest/neotest-python",
|
||||
"nvim-neotest/neotest-plenary",
|
||||
"rcarriga/neotest-vim-test",
|
||||
},
|
||||
config = function()
|
||||
local neotest = require("neotest")
|
||||
neotest.setup({
|
||||
adapters = {
|
||||
require("neotest-python")({
|
||||
dap = { justMyCode = false },
|
||||
runner = "pytest",
|
||||
python = ".venv/bin/python"
|
||||
}),
|
||||
require("neotest-plenary"),
|
||||
require("neotest-vim-test")({
|
||||
ignore_file_types = { "python", "vim", "lua" },
|
||||
}),
|
||||
},
|
||||
})
|
||||
vim.keymap.set('n', '<leader>tr' ,function() neotest.run.run() end ,{ desc = 'Neo[T]est [R]un' })
|
||||
vim.keymap.set('n', '<leader>tf' ,function() neotest.run.run(vim.fn.expand("%")) end ,{ desc = 'Neo[T]est Run [F]ile' })
|
||||
vim.keymap.set('n', '<leader>td' ,function() neotest.run.run({ strategy = "dap" }) end ,{ desc = 'Neo[T]est [D]ebug' })
|
||||
vim.keymap.set('n', '<leader>to' ,function() neotest.output_panel.toggle() end ,{ desc = 'Neo[T]est [O]utput Panel' })
|
||||
vim.keymap.set('n', '<leader>ts' ,function() neotest.summary.toggle() end ,{ desc = 'Neo[T]est [S]ummary Sidebar' })
|
||||
vim.keymap.set('n', ']t' ,function() neotest.jump.next({ status = 'failed' }) end,{ desc = 'Next Failed Test' })
|
||||
vim.keymap.set('n', '[t' ,function() neotest.jump.prev({ status = 'failed' }) end,{ desc = 'Prev Failed Test' })
|
||||
end,
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
return { -- adds a more in-depth file manager with support for syntax highlighting and more commands
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup({
|
||||
view = {
|
||||
side = "left",
|
||||
width = 30,
|
||||
},
|
||||
actions = {
|
||||
open_file = {
|
||||
-- This is the "open in adjacent pane" equivalent
|
||||
window_picker = { enable = true },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
return {
|
||||
"epwalsh/obsidian.nvim",
|
||||
version = "*", -- recommended, use latest release instead of latest commit
|
||||
lazy = true,
|
||||
-- ft = "markdown",
|
||||
-- swap event for ft line to load on all markdown files, not just those in the vault
|
||||
event = {
|
||||
-- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
|
||||
-- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
|
||||
-- refer to `:h file-pattern` for more examples
|
||||
"BufReadPre /home/venus/Documents/Notes/*.md",
|
||||
"BufNewFile /home/venus/Documents/Notes/*.md",
|
||||
},
|
||||
dependencies = {
|
||||
-- Required.
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
},
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
name = "Primay",
|
||||
path = "~/Notes",
|
||||
},
|
||||
{
|
||||
name = "Old",
|
||||
path = "~/Documents/Personal-Wiki/",
|
||||
},
|
||||
},
|
||||
daily_notes = {
|
||||
-- Optional, if you want to change the date format for the ID of daily notes.
|
||||
date_format = "%Y-%m-%d",
|
||||
-- Optional, default tags to add to each new daily note created.
|
||||
default_tags = { "daily" },
|
||||
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
|
||||
template = "templates/Daily Note.md",
|
||||
},
|
||||
new_notes_location = "current_dir",
|
||||
},
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
'RaafatTurki/hex.nvim',
|
||||
config = function()
|
||||
require 'hex'.setup {
|
||||
-- cli command used to dump hex data
|
||||
dump_cmd = 'xxd -g 1 -u',
|
||||
-- cli command used to assemble from hex data
|
||||
assemble_cmd = 'xxd -r',
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
return {
|
||||
"amitds1997/remote-nvim.nvim",
|
||||
version = "*", -- Pin to GitHub releases for stability
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("remote-nvim").setup({
|
||||
ssh_config_file_paths = { vim.fn.expand("$HOME/.ssh/config") },
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
local preferred_agent = "hermes"
|
||||
return {
|
||||
"folke/sidekick.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>as",
|
||||
function()
|
||||
require("sidekick.cli").select()
|
||||
end,
|
||||
desc = "Sidekick (Select AI CLI)",
|
||||
},
|
||||
{
|
||||
"<leader>aa",
|
||||
function()
|
||||
require("sidekick.cli").toggle({ name = preferred_agent, focus = true })
|
||||
end,
|
||||
desc = "Sidekick Toggle " .. preferred_agent,
|
||||
},
|
||||
{
|
||||
"<leader>ah",
|
||||
function()
|
||||
require("sidekick.cli").toggle({ name = "hermes", focus = true })
|
||||
end,
|
||||
desc = "Sidekick Toggle Hermes",
|
||||
},
|
||||
{
|
||||
"<leader>ak",
|
||||
function()
|
||||
require("sidekick.cli").toggle({ name = "antigravity", focus = true })
|
||||
end,
|
||||
desc = "Sidekick Toggle Antigravity",
|
||||
},
|
||||
{ "<leader>ap",
|
||||
function()
|
||||
require("sidekick.cli").prompt()
|
||||
end,
|
||||
desc = "Sidekick Prompt",
|
||||
},
|
||||
{ "<leader>an",
|
||||
function()
|
||||
require("sidekick.nes").jump()
|
||||
end,
|
||||
desc = "Sidekick Jump to Next Suggestion",
|
||||
},
|
||||
{ "<leader>at",
|
||||
function()
|
||||
require("sidekick.nes").toggle()
|
||||
end,
|
||||
desc = "toggle sidekick suggestions"
|
||||
},
|
||||
{ "<M-CR>",
|
||||
function()
|
||||
require("sidekick.nes").apply()
|
||||
end,
|
||||
desc = "apply sidekick suggestion"
|
||||
}
|
||||
},
|
||||
opts = {
|
||||
cli = {
|
||||
tools = {
|
||||
antigravity = {
|
||||
cmd = { "agy" },
|
||||
},
|
||||
hermes = {
|
||||
cmd = { "hermes" },
|
||||
is_proc = "\\<hermes\\>",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim', tag = 'v0.2.0',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'BurntSushi/ripgrep',
|
||||
'sharkdp/fd'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
return { -- basic tree sitter parser support
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
indent = { enable = true },
|
||||
highlight = { enable = true },
|
||||
folds = { enable = true },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"diff",
|
||||
"html",
|
||||
"javascript",
|
||||
"jsdoc",
|
||||
"json",
|
||||
"lua",
|
||||
"luadoc",
|
||||
"luap",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"printf",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"xml",
|
||||
"yaml",
|
||||
"zsh",
|
||||
"cmake",
|
||||
"c_sharp",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
-- Mostly Generated with Antigravity CLI Gemini 3.7 Flash
|
||||
return {
|
||||
"lervag/vimtex",
|
||||
lazy = false,
|
||||
init = function()
|
||||
vim.g.vimtex_compiler_method = "tectonic"
|
||||
vim.g.vimtex_quickfix_mode = 0
|
||||
vim.g.vimtex_view_enabled = 0 -- Disable external GUI popup
|
||||
end,
|
||||
config = function()
|
||||
local function open_pdf_split()
|
||||
local pdf_path = vim.fn.expand("%:p:r") .. ".pdf"
|
||||
if vim.fn.filereadable(pdf_path) == 1 then
|
||||
vim.cmd("vsplit " .. vim.fn.fnameescape(pdf_path))
|
||||
else
|
||||
vim.notify("PDF not found: " .. pdf_path .. "\nCompile first with <Space>ll", vim.log.levels.WARN)
|
||||
end
|
||||
end
|
||||
|
||||
-- Provide user command :VimtexPreviewBuffer
|
||||
vim.api.nvim_create_user_command("VimtexPreviewBuffer", open_pdf_split, { desc = "VimTeX: Open PDF in vertical split" })
|
||||
|
||||
-- Buffer-local keymaps for TeX files
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "tex", "latex" },
|
||||
callback = function(ev)
|
||||
local opts = { buffer = ev.buf, desc = "VimTeX: View PDF in Neovim split" }
|
||||
vim.keymap.set("n", "<localleader>lv", open_pdf_split, opts)
|
||||
vim.keymap.set("n", "<leader>lv", open_pdf_split, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Helper function to refresh and re-render all open PDF splits with image.nvim
|
||||
local function reload_pdf_buffers()
|
||||
local ok, image_api = pcall(require, "image")
|
||||
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
local buf_name = vim.api.nvim_buf_get_name(buf)
|
||||
if buf_name:match("%.pdf$") then
|
||||
vim.api.nvim_win_call(win, function()
|
||||
vim.cmd("edit!")
|
||||
end)
|
||||
if ok and image_api then
|
||||
local imgs = image_api.get_images({ window = win, buffer = buf })
|
||||
if #imgs > 0 then
|
||||
for _, img in ipairs(imgs) do
|
||||
img:clear()
|
||||
img:render()
|
||||
end
|
||||
else
|
||||
image_api.hijack_buffer(buf_name, win, buf)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Automatically trigger compilation on save (:w)
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = "*.tex",
|
||||
callback = function()
|
||||
if vim.b.vimtex and vim.fn.exists(":VimtexCompileSS") == 2 then
|
||||
vim.cmd("VimtexCompileSS")
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Automatically reload and re-render PDF splits when compilation finishes
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = { "VimtexEventCompileSuccess", "VimtexEventCompileStopped" },
|
||||
callback = function()
|
||||
reload_pdf_buffers()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
return { -- Useful plugin to show you pending keybinds.
|
||||
'folke/which-key.nvim',
|
||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||
opts = {
|
||||
-- delay between pressing a key and opening which-key (milliseconds)
|
||||
-- this setting is independent of vim.o.timeoutlen
|
||||
delay = 0,
|
||||
icons = {
|
||||
-- set icon mappings to true if you have a Nerd Font
|
||||
mappings = vim.g.have_nerd_font,
|
||||
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
|
||||
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
|
||||
keys = vim.g.have_nerd_font and {} or {
|
||||
Up = '<Up> ',
|
||||
Down = '<Down> ',
|
||||
Left = '<Left> ',
|
||||
Right = '<Right> ',
|
||||
C = '<C-…> ',
|
||||
M = '<M-…> ',
|
||||
D = '<D-…> ',
|
||||
S = '<S-…> ',
|
||||
CR = '<CR> ',
|
||||
Esc = '<Esc> ',
|
||||
ScrollWheelDown = '<ScrollWheelDown> ',
|
||||
ScrollWheelUp = '<ScrollWheelUp> ',
|
||||
NL = '<NL> ',
|
||||
BS = '<BS> ',
|
||||
Space = '<Space> ',
|
||||
Tab = '<Tab> ',
|
||||
F1 = '<F1>',
|
||||
F2 = '<F2>',
|
||||
F3 = '<F3>',
|
||||
F4 = '<F4>',
|
||||
F5 = '<F5>',
|
||||
F6 = '<F6>',
|
||||
F7 = '<F7>',
|
||||
F8 = '<F8>',
|
||||
F9 = '<F9>',
|
||||
F10 = '<F10>',
|
||||
F11 = '<F11>',
|
||||
F12 = '<F12>',
|
||||
},
|
||||
},
|
||||
|
||||
-- Document existing key chains
|
||||
spec = {
|
||||
{ '<leader>s', group = '[S]earch' },
|
||||
{ '<leader>t', group = '[T]oggle' },
|
||||
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
#xploring
|
||||
gzipped
|
||||
ext4
|
||||
picoCTF
|
||||
#othing
|
||||
symlinked
|
||||
Openrc
|
||||
dir
|
||||
Picoctf
|
||||
nc
|
||||
Gaviria
|
||||
unix
|
||||
linux
|
||||
netcat
|
||||
Ransomware
|
||||
tmux
|
||||
Pico
|
||||
Pico
|
||||
VPN
|
||||
WLAN
|
||||
GAN
|
||||
Lan
|
||||
TCP
|
||||
UPD
|
||||
biometrics
|
||||
WPA
|
||||
eduroam
|
||||
pre-defined
|
||||
#tateful
|
||||
hashcat
|
||||
Binary file not shown.
Reference in New Issue
Block a user