lazyvim
This commit is contained in:
1 parent
8a30e0caf6
commit
cdfe320c96
10 files changed
+564
-215
No files matched your search
@@ -0,0 +1,150 @@
|
||||
div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/292349/213446185-2db63fd5-8c84-459c-9f04-e286382d6e80.png">
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4 align="center">
|
||||
<a href="https://lazyvim.github.io/installation">Install</a>
|
||||
·
|
||||
<a href="https://lazyvim.github.io/configuration">Configure</a>
|
||||
·
|
||||
<a href="https://lazyvim.github.io">Docs</a>
|
||||
</h4>
|
||||
|
||||
<div align="center"><p>
|
||||
<a href="https://github.com/LazyVim/LazyVim/releases/latest">
|
||||
<img alt="Latest release" src="https://img.shields.io/github/v/release/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=C9CBFF&logoColor=D9E0EE&labelColor=302D41&include_prerelease&sort=semver" />
|
||||
</a>
|
||||
<a href="https://github.com/LazyVim/LazyVim/pulse">
|
||||
<img alt="Last commit" src="https://img.shields.io/github/last-commit/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=8bd5ca&logoColor=D9E0EE&labelColor=302D41"/>
|
||||
</a>
|
||||
<a href="https://github.com/LazyVim/LazyVim/blob/main/LICENSE">
|
||||
<img alt="License" src="https://img.shields.io/github/license/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=ee999f&logoColor=D9E0EE&labelColor=302D41" />
|
||||
</a>
|
||||
<a href="https://github.com/LazyVim/LazyVim/stargazers">
|
||||
<img alt="Stars" src="https://img.shields.io/github/stars/LazyVim/LazyVim?style=for-the-badge&logo=starship&color=c69ff5&logoColor=D9E0EE&labelColor=302D41" />
|
||||
</a>
|
||||
<a href="https://github.com/LazyVim/LazyVim/issues">
|
||||
<img alt="Issues" src="https://img.shields.io/github/issues/LazyVim/LazyVim?style=for-the-badge&logo=bilibili&color=F5E0DC&logoColor=D9E0EE&labelColor=302D41" />
|
||||
</a>
|
||||
<a href="https://github.com/LazyVim/LazyVim">
|
||||
<img alt="Repo Size" src="https://img.shields.io/github/repo-size/LazyVim/LazyVim?color=%23DDB6F2&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=302D41" />
|
||||
</a>
|
||||
<a href="https://twitter.com/intent/follow?screen_name=folke">
|
||||
<img alt="follow on Twitter" src="https://img.shields.io/twitter/follow/folke?style=for-the-badge&logo=twitter&color=8aadf3&logoColor=D9E0EE&labelColor=302D41" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
LazyVim is a Neovim setup powered by [💤 lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
to make it easy to customize and extend your config.
|
||||
Rather than having to choose between starting from scratch or using a
|
||||
pre-made distro, LazyVim offers the best of both worlds - the flexibility
|
||||
to tweak your config as needed, along with the convenience of a pre-configured setup.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## ✨ Features
|
||||
|
||||
- 🔥 Transform your Neovim into a full-fledged IDE
|
||||
- 💤 Easily customize and extend your config with [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
- 🚀 Blazingly fast
|
||||
- 🧹 Sane default settings for options, autocmds, and keymaps
|
||||
- 📦 Comes with a wealth of plugins pre-configured and ready to use
|
||||
|
||||
## ⚡️ Requirements
|
||||
|
||||
- Neovim >= **0.9.0** (needs to be built with **LuaJIT**)
|
||||
- Git >= **2.19.0** (for partial clones support)
|
||||
- a [Nerd Font](https://www.nerdfonts.com/) **_(optional)_**
|
||||
- a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements)
|
||||
|
||||
## 🚀 Getting Started
|
||||
|
||||
You can find a starter template for **LazyVim** [here](https://github.com/LazyVim/starter)
|
||||
|
||||
<details><summary>Try it with Docker</summary>
|
||||
|
||||
```sh
|
||||
docker run -w /root -it --rm alpine:edge sh -uelic '
|
||||
apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update
|
||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||
cd ~/.config/nvim
|
||||
nvim
|
||||
'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Install the <a href="https://github.com/LazyVim/starter">LazyVim Starter</a></summary>
|
||||
|
||||
- Make a backup of your current Neovim files:
|
||||
|
||||
```sh
|
||||
mv ~/.config/nvim ~/.config/nvim.bak
|
||||
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||
```
|
||||
|
||||
- Clone the starter
|
||||
|
||||
```sh
|
||||
git clone https://github.com/LazyVim/starter ~/.config/nvim
|
||||
```
|
||||
|
||||
- Remove the `.git` folder, so you can add it to your own repo later
|
||||
|
||||
```sh
|
||||
rm -rf ~/.config/nvim/.git
|
||||
```
|
||||
|
||||
- Start Neovim!
|
||||
|
||||
```sh
|
||||
nvim
|
||||
```
|
||||
|
||||
Refer to the comments in the files on how to customize **LazyVim**.
|
||||
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
There's a great video created by [@elijahmanor](https://github.com/elijahmanor) with a walkthrough to get started.
|
||||
|
||||
[](https://www.youtube.com/watch?v=N93cTbtLCIM)
|
||||
|
||||
[@dusty-phillips](https://github.com/dusty-phillips) wrote a comprehensive book called
|
||||
[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes)
|
||||
available for free online.
|
||||
|
||||
## 📂 File Structure
|
||||
|
||||
The files under config will be automatically loaded at the appropriate time,
|
||||
so you don't need to require those files manually.
|
||||
**LazyVim** comes with a set of default config files that will be loaded
|
||||
**_before_** your own. See [here](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config)
|
||||
|
||||
You can add your custom plugin specs under `lua/plugins/`. All files there
|
||||
will be automatically loaded by [lazy.nvim](https://github.com/folke/lazy.nvim)
|
||||
|
||||
<pre>
|
||||
~/.config/nvim
|
||||
├── lua
|
||||
│ ├── config
|
||||
│ │ ├── autocmds.lua
|
||||
│ │ ├── keymaps.lua
|
||||
│ │ ├── lazy.lua
|
||||
│ │ └── options.lua
|
||||
│ └── plugins
|
||||
│ ├── spec1.lua
|
||||
│ ├── **
|
||||
│ └── spec2.lua
|
||||
└── init.lua
|
||||
</pre>
|
||||
|
||||
## ⚙️ Configuration
|
||||
|
||||
Refer to the [docs](https://lazyvim.github.io)
|
||||
# lazy-vim-config
|
||||
@@ -1,202 +1,2 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git", "clone", "--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Set Leader Key to Space
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- Setup lazy.nvim with your plugin specifications
|
||||
require("lazy").setup({
|
||||
|
||||
-- Git signs
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "┃" },
|
||||
change = { text = "┃" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "┆" },
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
map("n", "]h", gs.next_hunk, { desc = "Next Git Hunk" })
|
||||
map("n", "[h", gs.prev_hunk, { desc = "Previous Git Hunk" })
|
||||
map("n", "<leader>hp", gs.preview_hunk, { desc = "Preview Hunk" })
|
||||
map("n", "<leader>hb", gs.blame_line, { desc = "Blame Line" })
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Telescope (Fuzzy Finder)
|
||||
{
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
keys = {
|
||||
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
||||
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live Grep (Search Text)" },
|
||||
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Find Buffers" },
|
||||
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help Tags" },
|
||||
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent Files" },
|
||||
},
|
||||
},
|
||||
|
||||
-- File Tree
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>e", "<cmd>NvimTreeToggle<cr>", desc = "Toggle NvimTree" },
|
||||
{ "<leader>o", "<cmd>NvimTreeFocus<cr>", desc = "Focus NvimTree" },
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup({
|
||||
view = {
|
||||
width = 35,
|
||||
relativenumber = true,
|
||||
},
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
lazy = false,
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
configs.setup({
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "python", "javascript" },
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- LSP & Mason Manager
|
||||
{ 'williamboman/mason.nvim', config = true },
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
{ 'neovim/nvim-lspconfig' },
|
||||
|
||||
-- Autocompletion Engine
|
||||
{
|
||||
'hrsh7th/nvim-cmp',
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'L3MON4D3/LuaSnip', -- Snippet engine required by cmp
|
||||
'saadparwaiz1/cmp_luasnip', -- Snippet completions
|
||||
},
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(), -- Trigger completion menu
|
||||
['<C-e>'] = cmp.mapping.abort(), -- Close completion menu
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept current selected item
|
||||
|
||||
-- Tab / Shift-Tab navigation through completion menu and snippet placeholders
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Formatting
|
||||
{
|
||||
'stevearc/conform.nvim',
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "black" },
|
||||
javascript = { "prettierd", "prettier" },
|
||||
},
|
||||
format_on_save = { timeout_ms = 500, lsp_fallback = true },
|
||||
},
|
||||
},
|
||||
|
||||
-- Autopairs
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
event = "InsertEnter",
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- Colorscheme
|
||||
{
|
||||
"tomasiser/vim-code-dark",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.opt.background = "dark"
|
||||
vim.cmd.colorscheme("codedark")
|
||||
end,
|
||||
},
|
||||
})
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
+35
-13
@@ -1,19 +1,41 @@
|
||||
{
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"LazyVim": { "branch": "main", "commit": "999700997f72227187d49d8b92667183dc7fc809" },
|
||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"catppuccin": { "branch": "main", "commit": "edefef779ab08ce1a4a404713e3012b0d202bd35" },
|
||||
"clangd_extensions.nvim": { "branch": "main", "commit": "78c2ecd659d54972be17aa6ba2deac3c53223b80" },
|
||||
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5be654f2232c10ddcad19c1607a67b6b4b78fc29" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "40276c4df7e6bdce6801d6c035c6227f9115a855" },
|
||||
"flash.nvim": { "branch": "main", "commit": "5f0f270fdc7c5b0c21d903ee85b9cb06f2ac636a" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "b4d01b0fdf3c9a549961c2f9ffe8dc09be166219" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "070a5d7b985546cc57e1fc61e5bc507fecac6045" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "11595bf747edc270bce2069d1020502ad4ae56cf" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "b3298993d55fa194279b5eb9dbfb3a43da65cadf" },
|
||||
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "430522f95fe4fb7c511ec64f8c1a90cc6a66c05c" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "84252f9832fb5b9024fe9f7258e7c2aff915e6fb" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "531b807b8f0d6f75016a0ee1e0cd5ce2086e9d95" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "41416e81a6c7f4af4984395bfe0cd8d174e70976" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "5f032a85be210cd1c6ac98861eb3b187ff3bd5eb" },
|
||||
"mini.ai": { "branch": "main", "commit": "6c39ae7b11abe479fbe1bc81bf00ac6bca7afa07" },
|
||||
"mini.icons": { "branch": "main", "commit": "f642e3ba8c12afbc8f32f6d77ef6597eac56786f" },
|
||||
"mini.pairs": { "branch": "main", "commit": "b1c5a726921b7a8c9321e9a7a208aa0571de5810" },
|
||||
"mini.surround": { "branch": "main", "commit": "33a2ebe5df8eb4751828fcba133e18ed0fbbdfab" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||
"nui.nvim": { "branch": "main", "commit": "10fc361835c856ba4233ef5ea135b919bf3dce97" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "6e9d953f0b82bccdb834cfde0e893f3119c22592" },
|
||||
"nvim-lint": { "branch": "master", "commit": "3d55c8f67c6ae5c15e1042571e107c7a3d5c5f4e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "a9bb4d5f4276aa5cddc015faa3ecc5a7b5a26b14" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "728e031f6b11d03d1f0708b7dc4fb0f1d9c8a137" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "5c7b0263797dfd1bd6202f2b219f3b53a80b2187" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "40aedd8a68c78a656a10a8d62d80c54af59420fb" },
|
||||
"vim-code-dark": { "branch": "master", "commit": "4624dc223bf574aa9a731c2383c579847303c380" }
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||
"transparent.nvim": { "branch": "main", "commit": "e00ca1cf09caef575edf8da7e5a8b9193893b4c7" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "a59d6092213447450191122c9346f309161504cb" },
|
||||
"venv-selector.nvim": { "branch": "main", "commit": "cc4bb3975de8835291f9bb45889e96c6b2795fc4" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.coding.mini-surround",
|
||||
"lazyvim.plugins.extras.lang.typescript",
|
||||
"lazyvim.plugins.extras.lang.typescript.biome",
|
||||
"lazyvim.plugins.extras.lang.python",
|
||||
"lazyvim.plugins.extras.lang.clangd",
|
||||
"lazyvim.plugins.extras.formatting.prettier",
|
||||
"lazyvim.plugins.extras.lang.zig",
|
||||
"lazyvim.plugins.extras.linting.eslint"
|
||||
],
|
||||
"install_version": 8,
|
||||
"news": {
|
||||
"NEWS.md": "11866"
|
||||
},
|
||||
"version": 8
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
-- 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")
|
||||
@@ -0,0 +1,3 @@
|
||||
-- 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
|
||||
@@ -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" } },
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
-- 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.opt.clipboard = "unnamedplus"
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
sv = "systemverilog",
|
||||
svh = "systemverilog",
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,274 @@
|
||||
-- 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 {
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin",
|
||||
},
|
||||
},
|
||||
|
||||
-- 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 = {},
|
||||
asm_lsp = {},
|
||||
emmet_language_server = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- 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, {
|
||||
"java",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"systemverilog",
|
||||
"vue",
|
||||
"zig",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
-- Sanity check: print to :messages so we know it ran
|
||||
vim.schedule(function() print("⏱️ lualine override loaded") end)
|
||||
|
||||
-- 1) Ensure opts.options exists, then override the theme:
|
||||
opts.options = opts.options or {}
|
||||
opts.options.theme = "catppuccin"
|
||||
|
||||
-- 2) Ensure the lualine_x section exists, then append your smile:
|
||||
opts.sections = opts.sections or {}
|
||||
opts.sections.lualine_x = opts.sections.lualine_x or {}
|
||||
table.insert(opts.sections.lualine_x, {
|
||||
function() return "😄" end,
|
||||
})
|
||||
|
||||
-- 3) Return the modified opts so LazyVim applies them:
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
"jdtls",
|
||||
"zls",
|
||||
"rust-analyzer",
|
||||
"vue-language-server",
|
||||
"eslint_d",
|
||||
"emmet-language-server",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"xiyaowong/transparent.nvim",
|
||||
-- You can load it early (lazy = false) or when Neovim is ready (e.g. event = "VeryLazy")
|
||||
lazy = false,
|
||||
priority = 1000, -- optional, ensures it loads early if you need transparency from the start
|
||||
config = function()
|
||||
require("transparent").setup({
|
||||
-- A list of default highlight groups to clear for transparency
|
||||
groups = {
|
||||
"Normal",
|
||||
"NormalNC",
|
||||
"Comment",
|
||||
"Constant",
|
||||
"Special",
|
||||
"Identifier",
|
||||
"Statement",
|
||||
"PreProc",
|
||||
"Type",
|
||||
"Underlined",
|
||||
"Todo",
|
||||
"String",
|
||||
"Function",
|
||||
"Conditional",
|
||||
"Repeat",
|
||||
"Operator",
|
||||
"Structure",
|
||||
"LineNr",
|
||||
"NonText",
|
||||
"SignColumn",
|
||||
"CursorLine",
|
||||
"CursorLineNr",
|
||||
"StatusLine",
|
||||
"StatusLineNC",
|
||||
"EndOfBuffer",
|
||||
},
|
||||
-- Add extra groups you want to clear (e.g. for floating windows or file tree plugins)
|
||||
-- extra_groups = { "NormalFloat" },
|
||||
-- Exclude any groups if you want them to retain their background settings
|
||||
exclude_groups = {
|
||||
"StatusLine",
|
||||
"StatusLineNC",
|
||||
"CursorLine",
|
||||
"FloatBorder",
|
||||
},
|
||||
-- Optional: run any additional command after clearing highlights
|
||||
on_clear = function()
|
||||
-- For example, make sure the Normal highlight has no background
|
||||
vim.cmd("hi Normal guibg=none")
|
||||
-- borders
|
||||
vim.cmd("highlight clear FloatBorder")
|
||||
vim.cmd("highlight link FloatBorder NormalFloat")
|
||||
-- titles
|
||||
vim.cmd("highlight clear FloatTitle")
|
||||
vim.cmd("highlight link FloatTitle NormalFloat")
|
||||
end,
|
||||
})
|
||||
|
||||
require("transparent").toggle(true)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"mfussenegger/nvim-jdtls",
|
||||
ft = { "java" },
|
||||
},
|
||||
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
lazy = false,
|
||||
},
|
||||
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
picker = {
|
||||
sources = {
|
||||
explorer = {
|
||||
-- copy the default “sidebar” layout but set it to the right
|
||||
layout = {
|
||||
layout = {
|
||||
box = "vertical", -- keep the vertical box
|
||||
position = "left", -- move to left
|
||||
width = 0.2, -- 20% of the window; tweak as you like
|
||||
-- below are the two child windows (input + list):
|
||||
{
|
||||
win = "input",
|
||||
max_height = 1,
|
||||
height = 1,
|
||||
border = { "", "", "", "", "", "", "", " " },
|
||||
wo = {
|
||||
-- example: keep your own winhighlight if you have one
|
||||
-- winhighlight = "FloatBorder:Normal,NormalFloat:Normal",
|
||||
},
|
||||
},
|
||||
{
|
||||
win = "list",
|
||||
border = "none",
|
||||
wo = {
|
||||
-- winhighlight = "FloatBorder:Normal,NormalFloat:Normal",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- you can keep any other overrides you had:
|
||||
-- win = { list = { keys = { ["<ESC>"]="", ["w"]="confirm" } } },
|
||||
ignored = true,
|
||||
hidden = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
<<<<<<< HEAD
|
||||
column_width = 120
|
||||
=======
|
||||
column_width = 120
|
||||
[sort_requires]
|
||||
enabled = true
|
||||
|
||||
>>>>>>> ec5981dfb1222c3bf246d9bcaa713d5cfa486fbd
|
||||
Reference in new issue
Block a user