Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea9cb6e06c | ||
|
|
3403d9ce91 | ||
|
|
24e805ab6d | ||
|
|
8c6dca1579 | ||
|
|
fa7d04a5b6 | ||
|
|
986d13911c | ||
|
|
656a8bf30b | ||
|
|
366d73e953 | ||
|
|
76ebc07967 | ||
|
|
d5f9f73858 | ||
|
|
a6bb97a976 | ||
|
|
a50feccdf1 | ||
|
|
94d055df6c | ||
|
|
6748a9ca3a | ||
|
|
b9de7e0075 | ||
|
|
da75a7f620 | ||
|
|
aede05419d | ||
|
|
0c06e4dbff | ||
|
|
63d93bf26f | ||
|
|
d5737a9613 | ||
|
|
dfb0078138 | ||
|
|
cc46a82f1a | ||
|
|
843b85e976 | ||
|
|
11fd5ab6c0 | ||
|
|
b49bf97063 | ||
|
|
2bfd6854f4 | ||
|
|
c2fdd9706b | ||
|
|
b361377302 | ||
|
|
4d834a6085 | ||
|
|
e650119427 | ||
|
|
4b51015881 | ||
|
|
7c0526481d | ||
|
|
2e83ca2650 | ||
|
|
cdc53a95b3 | ||
|
|
be2416f63f | ||
|
|
14b452df93 | ||
|
|
49b716842f | ||
|
|
f0a77e4cf8 | ||
|
|
0c8e3f57dc | ||
|
|
61c24ed7df | ||
|
|
80461cf9cc | ||
|
|
eb1dfe1e94 | ||
|
|
8a4b46ae95 | ||
|
|
c6caa76432 | ||
|
|
8183224a38 | ||
|
|
c316e5998f | ||
|
|
108c901cb6 | ||
|
|
3e0b9428e6 | ||
|
|
bc12d68747 | ||
|
|
18472df069 | ||
|
|
6708cdc338 | ||
|
|
ddb0b3a20e | ||
|
|
e6f98fdcc9 | ||
|
|
5a2356336c | ||
|
|
61cb33c09c | ||
|
|
e54aa15cee | ||
|
|
b982ddefda | ||
|
|
814579cfb0 | ||
|
|
2237050524 | ||
|
|
a7e242c07c | ||
|
|
4285581065 | ||
|
|
c717c3caff | ||
|
|
c712276279 | ||
|
|
b8f8596f5a | ||
|
|
17dd76004c | ||
|
|
5a140ff9b2 | ||
|
|
b3b7b61669 | ||
|
|
061bd574c3 | ||
|
|
aeae349df7 | ||
|
|
66369cb1d2 | ||
|
|
c7bdeca11a | ||
|
|
20d85270bf | ||
|
|
2412b7f9b9 | ||
|
|
9670f788bc | ||
|
|
0a20e5321f | ||
|
|
c7f38a01ae |
+1
-1
@@ -1,7 +1,7 @@
|
||||
liberapay: marcpartensky
|
||||
patreon: marcpartensky
|
||||
github: marcpartensky
|
||||
custom:
|
||||
# - monero:43J2XmRtjDPRLD35UsYGH2AZamFBQz7dt4VdvZXVm3SuadTrvcoXUXBRUNHqukFte23Q5TWXqhbwaLJJgoVQzzbe2AJDANQ
|
||||
- https://paypal.me/marcpartensky
|
||||
- https://buymeacoffee.com/marcpartensky
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '45 22 * * 4'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript', 'python' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -1,22 +0,0 @@
|
||||
name: Test docker builds for every branch except master
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "*"
|
||||
- "!master"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update apt
|
||||
run: sudo apt install docker-compose -y
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: build
|
||||
run: docker-compose build
|
||||
@@ -1,8 +1,6 @@
|
||||
name: Build all then push
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 4 * * *" # everyday at 4 am
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
@@ -13,23 +11,41 @@ on:
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: nvim-lua
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update apt
|
||||
run: sudo apt install docker-compose -y
|
||||
|
||||
- name: Build the tag
|
||||
id: tag
|
||||
run: echo "::set-output name=tag::$(git rev-parse --short HEAD).$(date +'%Y-%m-%d')"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: build
|
||||
run: docker-compose build
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: push
|
||||
run: docker-compose push
|
||||
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: marcpartensky/nvim-lua:latest
|
||||
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: marcpartensky/nvim-lua:v${{ github.run_number }}.${{ steps.tag.outputs.tag }}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
plugin/packer_compiled.lua
|
||||
+31
-19
@@ -1,25 +1,37 @@
|
||||
FROM archlinux:latest
|
||||
FROM alpine:latest
|
||||
|
||||
RUN whoami
|
||||
LABEL maintainer="Marc Partensky <marc.partensky@gmail.com"
|
||||
COPY . .config/nvim
|
||||
|
||||
RUN pacman -Syyyu --noconfirm \
|
||||
git \
|
||||
nodejs \
|
||||
npm \
|
||||
go \
|
||||
make \
|
||||
python \
|
||||
neovim
|
||||
|
||||
|
||||
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
|
||||
LABEL maintainer="Marc Partensky <marc.partensky@proton.me"
|
||||
|
||||
RUN touch .vimrc
|
||||
RUN nvim \
|
||||
+"source /root/.config/nvim/lua/marc/packer.lua" \
|
||||
# RUN localedef -i en_US -f UTF-8 en_US.UTF-8
|
||||
|
||||
RUN apk update
|
||||
RUN apk add \
|
||||
git \
|
||||
npm \
|
||||
yarn \
|
||||
python3 \
|
||||
# go \
|
||||
# make \
|
||||
# python-pip \
|
||||
neovim
|
||||
|
||||
# RUN npm i -g neovim
|
||||
# RUN pip install neovim
|
||||
|
||||
RUN git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||
~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
|
||||
COPY . /root/.config/nvim
|
||||
RUN nvim --headless -c "TSInstallSync maintained" -c q
|
||||
RUN nvim --headless -c PackerSync -c q
|
||||
|
||||
RUN nvim --headless \
|
||||
+"source /root/.config/nvim/init.lua" \
|
||||
+PackerSync \
|
||||
+PackerUpdate \
|
||||
+qall
|
||||
|
||||
ENTRYPOINT ["nvim"]
|
||||
# RUN nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
||||
|
||||
ENTRYPOINT ["nvim", "+checkhealth"]
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
FROM archlinux:latest
|
||||
|
||||
LABEL maintainer="Marc Partensky <marc.partensky@gmail.com"
|
||||
|
||||
RUN touch .vimrc
|
||||
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
|
||||
|
||||
RUN pacman -Syu --noconfirm \
|
||||
git \
|
||||
npm \
|
||||
yarn \
|
||||
# go \
|
||||
# make \
|
||||
python-pip \
|
||||
neovim
|
||||
|
||||
RUN npm i -g neovim
|
||||
RUN pip install neovim
|
||||
|
||||
RUN git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||
~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
|
||||
COPY . /root/.config/nvim
|
||||
RUN nvim --headless -c "TSInstallSync maintained" -c q
|
||||
RUN nvim --headless -c PackerSync -c q
|
||||
|
||||
RUN nvim --headless \
|
||||
+"source /root/.config/nvim/init.lua" \
|
||||
+PackerSync \
|
||||
+PackerUpdate \
|
||||
+qall
|
||||
|
||||
# RUN nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
|
||||
|
||||
ENTRYPOINT ["nvim", "+checkhealth"]
|
||||
@@ -1,56 +0,0 @@
|
||||
require 'lspconfig'.pyright.setup{}
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
local opts = { noremap=true, silent=true }
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap=true, silent=true, buffer=bufnr }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, bufopts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.formatting, bufopts)
|
||||
end
|
||||
|
||||
local lsp_flags = {
|
||||
-- This is the default in Nvim 0.7+
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
require('lspconfig')['pyright'].setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
}
|
||||
require('lspconfig')['tsserver'].setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
}
|
||||
require('lspconfig')['rust_analyzer'].setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
-- Server-specific settings...
|
||||
settings = {
|
||||
["rust-analyzer"] = {}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
-- local saga = require 'lspsaga'
|
||||
|
||||
-- change the lsp symbol kind
|
||||
-- local kind = require('lspsaga.lspkind')
|
||||
-- kind[type_number][2] = icon -- see lua/lspsaga/lspkind.lua
|
||||
|
||||
-- use default config
|
||||
-- saga.init_lsp_saga()
|
||||
@@ -1,4 +0,0 @@
|
||||
require 'mason'.setup()
|
||||
require 'mason-lspconfig'.setup({
|
||||
ensure_installed = { "sumneko_lua", "rust_analyzer" }
|
||||
})
|
||||
@@ -1,15 +0,0 @@
|
||||
require("transparent").setup({
|
||||
enable = true, -- boolean: enable transparent
|
||||
extra_groups = { -- table/string: additional groups that should be cleared
|
||||
-- In particular, when you set it to 'all', that means all available groups
|
||||
|
||||
-- example of akinsho/nvim-bufferline.lua
|
||||
"BufferLineTabClose",
|
||||
"BufferlineBufferSelected",
|
||||
"BufferLineFill",
|
||||
"BufferLineBackground",
|
||||
"BufferLineSeparator",
|
||||
"BufferLineIndicatorSelected",
|
||||
},
|
||||
exclude = {}, -- table: groups you don't want to clear
|
||||
})
|
||||
@@ -1,24 +0,0 @@
|
||||
-- examples for your init.lua
|
||||
|
||||
-- empty setup using defaults
|
||||
require("nvim-tree").setup()
|
||||
|
||||
-- OR setup with some options
|
||||
-- require("nvim-tree").setup({
|
||||
-- sort_by = "case_sensitive",
|
||||
-- view = {
|
||||
-- adaptive_size = true,
|
||||
-- mappings = {
|
||||
-- list = {
|
||||
-- { key = "u", action = "dir_up" },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- renderer = {
|
||||
-- group_empty = true,
|
||||
-- },
|
||||
-- filters = {
|
||||
-- dotfiles = true,
|
||||
-- },
|
||||
-- })
|
||||
vim.api.nvim_set_keymap('n', '<C-o>', ':NvimTreeToggle<CR>', {noremap = true, silent = true})
|
||||
@@ -1,11 +0,0 @@
|
||||
-- vim.opt.foldmethod = 'expr'
|
||||
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
---WORKAROUND
|
||||
-- vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, {
|
||||
-- group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
|
||||
-- callback = function()
|
||||
-- vim.opt.foldmethod = 'expr'
|
||||
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
-- end
|
||||
-- })
|
||||
---ENDWORKAROUND
|
||||
@@ -1,38 +0,0 @@
|
||||
require('onedark').setup {
|
||||
-- Main options --
|
||||
style = 'dark', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||
transparent = false, -- Show/hide background
|
||||
term_colors = true, -- Change terminal color as per the selected theme style
|
||||
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
|
||||
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
|
||||
|
||||
-- toggle theme style ---
|
||||
toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
|
||||
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, -- List of styles to toggle between
|
||||
|
||||
-- Change code style ---
|
||||
-- Options are italic, bold, underline, none
|
||||
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
|
||||
code_style = {
|
||||
comments = 'italic',
|
||||
keywords = 'none',
|
||||
functions = 'none',
|
||||
strings = 'none',
|
||||
variables = 'none'
|
||||
},
|
||||
|
||||
-- Custom Highlights --
|
||||
colors = {}, -- Override default colors
|
||||
highlights = {}, -- Override highlight groups
|
||||
|
||||
-- Plugins Config --
|
||||
diagnostics = {
|
||||
darker = true, -- darker colors for diagnostic
|
||||
undercurl = true, -- use undercurl instead of underline for diagnostics
|
||||
background = true, -- use background color for virtual text
|
||||
},
|
||||
}
|
||||
require('onedark').setup {
|
||||
style = 'darker'
|
||||
}
|
||||
require('onedark').load()
|
||||
@@ -1,4 +0,0 @@
|
||||
vim.tokyonight_transparent_sidebar = true
|
||||
vim.tokyonight_transparent = true
|
||||
vim.opt.background = "dark"
|
||||
-- vim.cmd("colorscheme tokyonight")
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
nvim-lua:
|
||||
nvim:
|
||||
image: marcpartensky/nvim-lua
|
||||
build: .
|
||||
tty: true
|
||||
stdin_open: true
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
require("marc.set")
|
||||
require("marc.remap")
|
||||
require("marc.packer")
|
||||
require "config.lazy"
|
||||
require "config.set"
|
||||
require "config.keybinds"
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "2e3c8cc5a57ddd32f1edd2ffd2ccb10c09421f6c" },
|
||||
"conform.nvim": { "branch": "master", "commit": "310e2e95a4f832163f3f7a9fedebb1a4afc0db69" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "5473e3d77c13e40fc4758fa977a1f2c14d0b4ceb" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "6f920cfabddb9b7de5a3a4d0b7cd4f0774ae23e2" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
|
||||
"neovim-session-manager": { "branch": "master", "commit": "35c154a4b904cbe2aa7acce00a8c1c54a8831780" },
|
||||
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "01e08d4bf1c35e5126b2ad5209725e4c552289ab" },
|
||||
"nvim-scrollbar": { "branch": "main", "commit": "d09f14aa16c9f2748e77008f9da7b1f76e4e7b85" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "dd7bb795c48b5b9795bde0537bb29ddf9fb7b42d" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "fae34f7c635797f4bf62fb00e7d0516efa8abe37" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "bfcc7d5c6f12209139f175e6123a7b7de6d9c18a" },
|
||||
"treesj": { "branch": "main", "commit": "275f83c81a5a1f5ae23c1eac30c4ac28beebbca2" },
|
||||
"vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" }
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
local keymap = vim.api.nvim_set_keymap
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Modes
|
||||
-- normal_mode = "n",
|
||||
-- insert_mode = "i",
|
||||
-- visual_mode = "v",
|
||||
-- visual_block_mode = "x",
|
||||
-- term_mode = "t",
|
||||
-- command_mode = "c",
|
||||
|
||||
keymap('n', '<C-i>', ":!$PWD/%<cr>", opts)
|
||||
keymap('n', '<c-n>', ":!alacritty -e nvim '+Telescope find_files'<cr>n", opts)
|
||||
-- keymap('n', '<C-u>', ":PackerUpdate<cr>", opts)
|
||||
keymap('n', '<c-a>', "ggVG", opts)
|
||||
keymap('n', '<c-s>', ":w<cr>", opts)
|
||||
|
||||
-- linting
|
||||
-- keymap('n', '<c-y>', ":!pylint %<cr>", opts)
|
||||
keymap('n', '<c-m>', ":!make <cr>", opts)
|
||||
|
||||
|
||||
-- tabs
|
||||
keymap('n', '<c-t>', ":tabnew<cr>", opts)
|
||||
keymap('n', '<c-w>', ":q<cr>", opts)
|
||||
keymap('n', '<tab>', ':BufferLineCycleNext<cr>', opts)
|
||||
keymap('n', '<s-tab>', ':BufferLineCyclePrev<cr>', opts)
|
||||
-- keymap('n', '<c-w>', ":BufferClose<cr>", opts)
|
||||
-- keymap('n', '<tab>', ':BufferNext<CR>', opts)
|
||||
-- keymap('n', '<s-tab>', ':BufferPrevious<CR>', opts)
|
||||
-- keymap('n', '<c-1>', ':BufferGoto 1<CR>', opts)
|
||||
-- keymap('n', '<c-2>', ':BufferGoto 2<CR>', opts)
|
||||
-- keymap('n', '<c-3>', ':BufferGoto 3<CR>', opts)
|
||||
-- keymap('n', '<c-4>', ':BufferGoto 4<CR>', opts)
|
||||
-- keymap('n', '<c-5>', ':BufferGoto 5<CR>', opts)
|
||||
-- keymap('n', '<c-6>', ':BufferGoto 6<CR>', opts)
|
||||
-- keymap('n', '<c-7>', ':BufferGoto 7<CR>', opts)
|
||||
-- keymap('n', '<c-8>', ':BufferGoto 8<CR>', opts)
|
||||
-- keymap('n', '<c-9>', ':BufferGoto 9<CR>', opts)
|
||||
-- keymap('n', '<c-0>', ':BufferLast<CR>', opts)
|
||||
|
||||
-- git
|
||||
keymap('n', 'gp', ":!gp<cr>", opts)
|
||||
keymap('n', 'gn', ":!gn ", opts)
|
||||
keymap('n', 'gt', ":!gt ", opts)
|
||||
keymap('n', 'gl', ":!gpl<cr>", opts)
|
||||
keymap('n', 'gr', ":!grsh<cr>", opts)
|
||||
|
||||
-- fn
|
||||
keymap('n', '<f1>', ":Lazy update<cr>", opts)
|
||||
-- keymap('n', '<f1>', ":PackerSync<cr>", opts)
|
||||
keymap('n', '<f2>', ":!curl --silent ipconfig.io<cr>", opts)
|
||||
|
||||
-- markdown preview
|
||||
-- keymap('n', '<mp>', ":MarkdownPreviewToggle", opts)
|
||||
|
||||
-- split
|
||||
keymap("n", "<c-h>", "<C-w>h", opts)
|
||||
keymap("n", "<c-j>", "<C-w>j", opts)
|
||||
keymap("n", "<c-k>", "<C-w>k", opts)
|
||||
keymap("n", "<c-l>", "<C-w>l", opts)
|
||||
|
||||
-- comments.nvim
|
||||
keymap("n", "<c-/>", "<Cmd>lua require('Comment.api').toggle.linewise.current()<cr>", opts)
|
||||
keymap("i", "<c-/>", "<Cmd>lua require('Comment.api').toggle.linewise.current()<cr>", opts)
|
||||
keymap("v", "<c-/>", "gc", opts)
|
||||
|
||||
-- neotree
|
||||
keymap("n", "<c-o>", ":Neotree toggle<cr>", opts)
|
||||
|
||||
-- nvim-tree
|
||||
-- keymap('n', '<C-o>', ':NvimTreeToggle<CR>', opts)
|
||||
-- vim.keymap.set('n', '<C-t>', "<CMD>lua require('nvim-tree.api').tree.change_root_to_parent", opts('Up'))
|
||||
-- vim.keymap.set('n', '?', "<CMD>lua require('nvim-tree.api').tree.toggle_help()", opts('Help'))
|
||||
|
||||
-- neovim-session-manager
|
||||
keymap('n', '<c-f>', ':SessionManager load_session<cr>', opts)
|
||||
keymap('n', '<c-x>', ':SessionManager save_current_session<cr>', opts)
|
||||
keymap('n', '<c-q>', ':SessionManager delete_session<CR>', opts)
|
||||
@@ -0,0 +1,60 @@
|
||||
-- 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"
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require('lazy').setup({
|
||||
-- Example plugins from your list
|
||||
spec = {
|
||||
-- import your plugins
|
||||
-- { import = "plugins" },
|
||||
-- { import = "plugins.tokyonight" }, -- theme
|
||||
{ import = "plugins.onedark" }, -- theme
|
||||
-- { import = "plugins.wal" }, -- theme
|
||||
{ import = "plugins.treesitter" }, -- syntax coloring
|
||||
{ import = "plugins.bufferline" }, -- tabs
|
||||
{ import = "plugins.telescope" }, -- search
|
||||
{ import = "plugins.lspconfig" }, -- language autocompletion
|
||||
{ import = "plugins.nvim-cmp" }, -- autocompletion
|
||||
{ import = "plugins.nvim-web-devicons" }, -- icons
|
||||
{ import = "plugins.conform" }, -- autoformatter
|
||||
{ import = "plugins.lualine" }, -- bottom bar
|
||||
{ import = "plugins.autopairs" }, -- autopairs
|
||||
{ import = "plugins.dashboard" }, -- dashboard when empty tab
|
||||
{ import = "plugins.lspsaga" }, -- lsp show function params
|
||||
{ import = "plugins.scrollbar" }, -- scrollbar
|
||||
-- { import = "plugins.nvim-tree" }, -- tab for file explorer
|
||||
{ import = "plugins.neo-tree" }, -- tab for file explorer
|
||||
{ import = "plugins.vim-smoothie" }, -- smooth cursor scroll
|
||||
{ import = "plugins.comment" }, -- comment doesnt work
|
||||
{ import = "plugins.treesj" }, -- split/join blocks of code
|
||||
-- { import = "plugins.noice" }, -- notifications
|
||||
{ import = "plugins.session-manager" }, -- notifications
|
||||
{ import = "plugins.dressing" } -- nice ui for selection
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
-- install = { colorscheme = { "onedark" } }, -- doesnt change a thing
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
-- {
|
||||
-- 'wbthomason/packer.nvim',
|
||||
-- -- This will load packer.nvim
|
||||
-- },
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
{
|
||||
'marcpartensky/markdown-preview.nvim',
|
||||
run = 'cd app && yarn install', -- Assuming this is a necessary setup step
|
||||
cmd = 'MarkdownPreview',
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,174 @@
|
||||
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
|
||||
|
||||
-- Only required if you have packer configured as `opt`
|
||||
local fn = vim.fn
|
||||
|
||||
-- Automatically install packer
|
||||
local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
PACKER_BOOTSTRAP = fn.system {
|
||||
"git",
|
||||
"clone",
|
||||
"--depth",
|
||||
"1",
|
||||
"https://github.com/wbthomason/packer.nvim",
|
||||
install_path,
|
||||
}
|
||||
print "Installing packer close and reopen Neovim..."
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
end
|
||||
|
||||
-- Autocommand that reloads neovim whenever you save the plugins.lua file
|
||||
vim.cmd [[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
||||
augroup end
|
||||
]]
|
||||
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
|
||||
-- lazy
|
||||
-- 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)
|
||||
|
||||
|
||||
-- require('lazy').setup({
|
||||
-- {
|
||||
-- 'akinsho/bufferline.nvim',
|
||||
-- version = '*',
|
||||
-- dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
-- event = { 'VimEnter' },
|
||||
-- init = function()
|
||||
-- vim.o.termguicolors = true
|
||||
-- end,
|
||||
-- opts = {},
|
||||
-- },
|
||||
-- {
|
||||
-- 'nvim-treesitter/nvim-treesitter',
|
||||
-- build = ':TSUpdate',
|
||||
-- event = { 'VimEnter' },
|
||||
-- config = function(_, opts)
|
||||
-- require('nvim-treesitter.configs').setup(opts)
|
||||
-- end,
|
||||
-- opts = {
|
||||
-- ensure_installed = { 'lua', 'vim', 'vimdoc' },
|
||||
-- highlight = { enable = true },
|
||||
-- },
|
||||
-- },
|
||||
-- })
|
||||
|
||||
return require('packer').startup(function()
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
-- use 'williamboman/mason.nvim'
|
||||
use 'williamboman/mason-lspconfig.nvim'
|
||||
|
||||
-- raw completion
|
||||
use 'hrsh7th/nvim-cmp' -- the completion plugin
|
||||
use 'hrsh7th/cmp-buffer' -- buffer completions
|
||||
use 'hrsh7th/cmp-path' -- path completions
|
||||
use 'hrsh7th/cmp-cmdline' -- cmdline completions
|
||||
use 'hrsh7th/cmp-nvim-lsp' -- use lsp completions
|
||||
|
||||
use 'nvim-tree/nvim-web-devicons'
|
||||
|
||||
use 'neovim/nvim-lspconfig' --
|
||||
-- use({ "glepnir/lspsaga.nvim", branch = "main" })
|
||||
|
||||
-- buffers(tabs)
|
||||
-- use { 'akinsho/bufferline.nvim', tag = "v3.*", requires = 'nvim-tree/nvim-web-devicons' }
|
||||
|
||||
-- use {
|
||||
-- 'akinsho/bufferline.nvim',
|
||||
-- tag = "*",
|
||||
-- -- config = function()
|
||||
-- -- require('nvim-tree/nvim-web-devicons').setup()
|
||||
-- -- end
|
||||
-- requires = {
|
||||
-- 'nvim-tree/nvim-web-devicons', -- optional, for file icons
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- use {'romgrk/barbar.nvim', wants = 'nvim-web-devicons'}
|
||||
|
||||
-- comment
|
||||
use {
|
||||
'numToStr/Comment.nvim',
|
||||
config = function()
|
||||
require('Comment').setup()
|
||||
end
|
||||
}
|
||||
|
||||
-- main theme
|
||||
use 'navarasu/onedark.nvim'
|
||||
|
||||
-- transparent frontground
|
||||
-- use 'xiyaowong/nvim-transparent'
|
||||
-- use 'folke/tokyonight.nvim'
|
||||
--
|
||||
-- smooth scroll with <C-d>
|
||||
use 'psliwka/vim-smoothie'
|
||||
-- integration with pywal
|
||||
use 'dylanaraps/wal.vim'
|
||||
-- autopairs
|
||||
use "windwp/nvim-autopairs"
|
||||
-- better make
|
||||
use 'neomake/neomake'
|
||||
|
||||
-- markdown
|
||||
use { 'marcpartensky/markdown-preview.nvim', run = 'cd app && yarn install', cmd = 'MarkdownPreview' }
|
||||
use {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
-- :TSUpdate[Sync] doesn't exist until plugin/nvim-treesitter is loaded (i.e. not after first install); call update() directly
|
||||
run = function() require("nvim-treesitter.install").update { with_sync = true } end
|
||||
}
|
||||
|
||||
-- navigation
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.4',
|
||||
-- or , branch = '0.1.x',
|
||||
requires = { { 'nvim-lua/plenary.nvim' } }
|
||||
}
|
||||
use {
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
requires = {
|
||||
'nvim-tree/nvim-web-devicons', -- optional, for file icons
|
||||
},
|
||||
-- tag = 'nightly' -- optional, updated every week. (see issue #1193)
|
||||
}
|
||||
|
||||
-- bottom line
|
||||
use {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
||||
}
|
||||
|
||||
-- startup pannel
|
||||
use 'glepnir/dashboard-nvim'
|
||||
|
||||
-- Lightweight yet powerful formatter plugin for Neovim
|
||||
use({
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("conform").setup()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if PACKER_BOOTSTRAP then
|
||||
require("packer").sync()
|
||||
end
|
||||
end)
|
||||
@@ -0,0 +1,31 @@
|
||||
local opt = vim.opt
|
||||
-- inspired from https://github.com/brainfucksec/neovim-lua/blob/main/nvim/lua/core/options.lua
|
||||
|
||||
-- general
|
||||
opt.swapfile = false
|
||||
opt.clipboard = "unnamedplus"
|
||||
opt.undofile = true
|
||||
opt.completeopt = "menuone,noinsert,noselect"
|
||||
|
||||
-- neovim ui
|
||||
opt.number = false
|
||||
opt.relativenumber = true
|
||||
opt.smartcase = true
|
||||
opt.linebreak = true
|
||||
opt.ignorecase = true
|
||||
opt.guicursor = ""
|
||||
-- opt.laststatus = 3
|
||||
opt.background = "dark"
|
||||
|
||||
-- tabs indents
|
||||
opt.expandtab = true
|
||||
opt.smartindent = true
|
||||
opt.tabstop = 4
|
||||
opt.softtabstop = 4
|
||||
opt.shiftwidth = 4
|
||||
|
||||
-- others
|
||||
opt.hlsearch = false
|
||||
opt.incsearch = true
|
||||
opt.wrap = false
|
||||
opt.nu = true
|
||||
@@ -1,39 +0,0 @@
|
||||
-- This file can be loaded by calling `lua require('plugins')` from your init.vim
|
||||
|
||||
-- Only required if you have packer configured as `opt`
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
|
||||
return require('packer').startup(function()
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
use 'williamboman/mason.nvim'
|
||||
use 'williamboman/mason-lspconfig.nvim'
|
||||
use 'neovim/nvim-lspconfig'
|
||||
use({ "glepnir/lspsaga.nvim", branch = "main" })
|
||||
-- main theme
|
||||
use 'navarasu/onedark.nvim'
|
||||
-- transparent background
|
||||
use 'xiyaowong/nvim-transparent'
|
||||
-- use 'folke/tokyonight.nvim'
|
||||
use 'b3nj5m1n/kommentary'
|
||||
-- smooth scroll with <C-d>
|
||||
use 'psliwka/vim-smoothie'
|
||||
-- integration with pywal
|
||||
use 'dylanaraps/wal.vim'
|
||||
-- better make
|
||||
use 'neomake/neomake'
|
||||
use {'marcpartensky/markdown-preview.nvim', run = 'cd app && yarn install', cmd = 'MarkdownPreview' }
|
||||
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
||||
-- or , branch = '0.1.x',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
use {
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
requires = {
|
||||
'kyazdani42/nvim-web-devicons', -- optional, for file icons
|
||||
},
|
||||
tag = 'nightly' -- optional, updated every week. (see issue #1193)
|
||||
}
|
||||
end)
|
||||
@@ -1,2 +0,0 @@
|
||||
-- local nnoremap = require("marc.keymap").nnoremap
|
||||
-- nnoremap("<leader>pv", "<cmd>Ex<CR>")
|
||||
@@ -1,11 +0,0 @@
|
||||
vim.opt.guicursor = ""
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.wrap = false
|
||||
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
local npairs = require "nvim-autopairs"
|
||||
|
||||
npairs.setup {
|
||||
check_ts = true,
|
||||
ts_config = {
|
||||
lua = { "string", "source" },
|
||||
javascript = { "string", "template_string" },
|
||||
java = false,
|
||||
},
|
||||
disable_filetype = { "TelescopePrompt", "spectre_panel" },
|
||||
fast_wrap = {
|
||||
map = "<M-e>",
|
||||
chars = { "{", "[", "(", '"', "'" },
|
||||
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
|
||||
offset = 0, -- Offset from pattern match
|
||||
end_key = "$",
|
||||
keys = "qwertyuiopzxcvbnmasdfghjkl",
|
||||
check_comma = true,
|
||||
highlight = "PmenuSel",
|
||||
highlight_grey = "LineNr",
|
||||
},
|
||||
}
|
||||
|
||||
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||
local cmp = require "cmp"
|
||||
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } })
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
-- -- Set barbar's options
|
||||
-- require'bufferline'.setup {
|
||||
-- -- Enable/disable animations
|
||||
-- animation = true,
|
||||
--
|
||||
-- -- Enable/disable auto-hiding the tab bar when there is a single buffer
|
||||
-- auto_hide = false,
|
||||
--
|
||||
-- -- Enable/disable current/total tabpages indicator (top right corner)
|
||||
-- tabpages = true,
|
||||
--
|
||||
-- -- Enable/disable close button
|
||||
-- closable = true,
|
||||
--
|
||||
-- -- Enables/disable clickable tabs
|
||||
-- -- - left-click: go to buffer
|
||||
-- -- - middle-click: delete buffer
|
||||
-- clickable = true,
|
||||
--
|
||||
-- -- Enables / disables diagnostic symbols
|
||||
-- diagnostics = {
|
||||
-- -- you can use a list
|
||||
-- {enabled = true, icon = 'ff'}, -- ERROR
|
||||
-- {enabled = false}, -- WARN
|
||||
-- {enabled = false}, -- INFO
|
||||
-- {enabled = true}, -- HINT
|
||||
--
|
||||
-- -- OR `vim.diagnostic.severity`
|
||||
-- [vim.diagnostic.severity.ERROR] = {enabled = true, icon = 'ff'},
|
||||
-- [vim.diagnostic.severity.WARN] = {enabled = false},
|
||||
-- [vim.diagnostic.severity.INFO] = {enabled = false},
|
||||
-- [vim.diagnostic.severity.HINT] = {enabled = true},
|
||||
-- },
|
||||
--
|
||||
-- -- Excludes buffers from the tabline
|
||||
-- exclude_ft = {'javascript'},
|
||||
-- exclude_name = {'package.json'},
|
||||
--
|
||||
-- -- Hide inactive buffers and file extensions. Other options are `alternate`, `current`, and `visible`.
|
||||
-- hide = {extensions = true, inactive = false},
|
||||
--
|
||||
-- -- Disable highlighting alternate buffers
|
||||
-- highlight_alternate = false,
|
||||
--
|
||||
-- -- Enable highlighting visible buffers
|
||||
-- highlight_visible = true,
|
||||
--
|
||||
-- -- Enable/disable icons
|
||||
-- -- if set to 'numbers', will show buffer index in the tabline
|
||||
-- -- if set to 'both', will show buffer index and icons in the tabline
|
||||
-- icons = true,
|
||||
--
|
||||
-- -- If set, the icon color will follow its corresponding buffer
|
||||
-- -- highlight group. By default, the Buffer*Icon group is linked to the
|
||||
-- -- Buffer* group (see Highlighting below). Otherwise, it will take its
|
||||
-- -- default value as defined by devicons.
|
||||
-- icon_custom_colors = false,
|
||||
--
|
||||
-- -- Configure icons on the bufferline.
|
||||
-- icon_separator_active = '▎',
|
||||
-- icon_separator_inactive = '▎',
|
||||
-- icon_close_tab = '',
|
||||
-- icon_close_tab_modified = '●',
|
||||
-- icon_pinned = '車',
|
||||
--
|
||||
-- -- If true, new buffers will be inserted at the start/end of the list.
|
||||
-- -- Default is to insert after current buffer.
|
||||
-- insert_at_end = false,
|
||||
-- insert_at_start = false,
|
||||
--
|
||||
-- -- Sets the maximum padding width with which to surround each tab
|
||||
-- maximum_padding = 1,
|
||||
--
|
||||
-- -- Sets the minimum padding width with which to surround each tab
|
||||
-- minimum_padding = 1,
|
||||
--
|
||||
-- -- Sets the maximum buffer name length.
|
||||
-- maximum_length = 30,
|
||||
--
|
||||
-- -- If set, the letters for each buffer in buffer-pick mode will be
|
||||
-- -- assigned based on their name. Otherwise or in case all letters are
|
||||
-- -- already assigned, the behavior is to assign letters in order of
|
||||
-- -- usability (see order below)
|
||||
-- semantic_letters = true,
|
||||
--
|
||||
-- -- New buffer letters are assigned in this order. This order is
|
||||
-- -- optimal for the qwerty keyboard layout but might need adjustement
|
||||
-- -- for other layouts.
|
||||
-- letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP',
|
||||
--
|
||||
-- -- Sets the name of unnamed buffers. By default format is "[Buffer X]"
|
||||
-- -- where X is the buffer number. But only a static string is accepted here.
|
||||
-- no_name_title = nil,
|
||||
-- }
|
||||
@@ -0,0 +1,33 @@
|
||||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
run = ':TSUpdate',
|
||||
config = function()
|
||||
vim.opt.termguicolors = true
|
||||
require("bufferline").setup {
|
||||
options = {
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = "Nvim Tree",
|
||||
separator = true,
|
||||
text_align = "left"
|
||||
}
|
||||
},
|
||||
mode = "tabs",
|
||||
diagnostics = "nvim_lsp",
|
||||
separator_style = { "", "" },
|
||||
buffer_close_icon = '',
|
||||
modified_icon = '●',
|
||||
left_trunc_marker = '',
|
||||
right_trunc_marker = '',
|
||||
show_close_icon = true,
|
||||
show_buffer_close_icons = true,
|
||||
color_icons = true,
|
||||
show_tab_indicators = true,
|
||||
hover = {
|
||||
enable = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
config = function()
|
||||
require('Comment').setup({
|
||||
---Add a space b/w comment and the line
|
||||
padding = true,
|
||||
---Whether the cursor should stay at its position
|
||||
sticky = true,
|
||||
-- Lines to be ignored while (un)comment
|
||||
ignore = '^$',
|
||||
---LHS of toggle mappings in NORMAL mode
|
||||
toggler = {
|
||||
---Line-comment toggle keymap
|
||||
line = 'gcc',
|
||||
---Block-comment toggle keymap
|
||||
block = 'gbc',
|
||||
},
|
||||
---LHS of operator-pending mappings in NORMAL and VISUAL mode
|
||||
opleader = {
|
||||
---Line-comment keymap
|
||||
line = 'gc',
|
||||
---Block-comment keymap
|
||||
block = 'gb',
|
||||
},
|
||||
---LHS of extra mappings
|
||||
extra = {
|
||||
---Add comment on the line above
|
||||
above = 'gcO',
|
||||
---Add comment on the line below
|
||||
below = 'gco',
|
||||
---Add comment at the end of line
|
||||
eol = 'gcA',
|
||||
},
|
||||
---Enable keybindings
|
||||
---NOTE: If given `false` then the plugin won't create any mappings
|
||||
mappings = {
|
||||
---Operator-pending mapping; `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
|
||||
basic = true,
|
||||
---Extra mapping; `gco`, `gcO`, `gcA`
|
||||
extra = true,
|
||||
---Extended mapping; `g>` `g<` `g>[count]{motion}` `g<[count]{motion}`
|
||||
extended = false,
|
||||
},
|
||||
---Function to call before (un)comment
|
||||
pre_hook = nil,
|
||||
---Function to call after (un)comment
|
||||
post_hook = nil,
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
'stevearc/conform.nvim',
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
-- Conform will run multiple formatters sequentially
|
||||
python = { "black" },
|
||||
-- Use a sub-list to run only the first available formatter
|
||||
javascript = { "prettier" },
|
||||
typescript = { "prettier" }
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,242 @@
|
||||
return {
|
||||
"glepnir/dashboard-nvim",
|
||||
config = function()
|
||||
local db = require('dashboard')
|
||||
local version = vim.version()
|
||||
|
||||
db.custom_header = {
|
||||
' ▄█ █ █▄ ',
|
||||
' ▐██ ▄█ ███ █▄ ██▌ ',
|
||||
' ▐██▌ ██████████████ ▐██▌ ',
|
||||
' ████ ████████████████ ████ ',
|
||||
' ▐█████ ██████████████████ █████▌ ',
|
||||
' ████████████████████████████████ ',
|
||||
' ███████▀▀████████████▀▀███████ ',
|
||||
' █████▌ ▄▄ ▀████▀ ▄▄ ▐█████ ',
|
||||
' ▄▄██████▄ ▀▀ ████ ▀▀ ▄██████▄▄ ',
|
||||
' ██████████████████████████████████ ',
|
||||
' ████████████████████████████████████ ',
|
||||
' ██████ ███████▀▄██▄▀███████ ██████▌ ',
|
||||
'▐█████ ██████████████████ █████▌ ',
|
||||
' ▐█████ ██████▀ ▀██████ █████▌ ',
|
||||
' █████▄ ███ ███ ▄█████ ',
|
||||
' ██████ █ █ ██████ ',
|
||||
' █████ █████ ',
|
||||
' █████ █████ ',
|
||||
' ████ ▄ ▄ ████ ',
|
||||
' ████ ██ ██ ████ ',
|
||||
' ████████ ▄██▄ ████████ ',
|
||||
' ████████████████████████ ',
|
||||
' ████████████████████████ ',
|
||||
' ▀█████████▀▀█████████▀ ',
|
||||
' ▀███▀ ▀███▀ ',
|
||||
}
|
||||
-- db.custom_header = {
|
||||
-- '',
|
||||
-- '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
|
||||
-- '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
|
||||
-- '⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠛⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
|
||||
-- '⠀⠀⠀⠀⠀⠀⢰⣶⣶⣶⠀⣶⣶⣶⣶⠀⢰⣶⣶⣶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
|
||||
-- '⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⠀⣿⣿⣿⣿⠀⢸⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
|
||||
-- '⠀⢠⣤⣤⣤⠀⢠⣤⣤⣤⠀⣤⣤⣤⣤⠀⢠⣤⣤⣤⠀⣰⣿⣿⣦⡀⠀⠀⠀⠀',
|
||||
-- '⠀⢸⣿⣿⣿⠀⢸⣿⣿⣿⠀⣿⣿⣿⣿⠀⢸⣿⣿⣿⠀⣿⣿⠹⣿⣷⣀⠀⠀⠀',
|
||||
-- '⠀⠘⠛⠛⠛⠀⠘⠛⠛⠛⠀⠛⠛⠛⠛⠀⠘⠛⠛⠛⢀⣿⣿⡀⠙⠿⠿⣿⣶⣆',
|
||||
-- '⣴⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣿⣿⣿⠟⢁⣤⣴⣶⣾⡿⠋',
|
||||
-- '⣿⣿⣿⣛⣛⣛⣛⣿⣟⣛⣛⣻⣿⣟⣛⣛⣻⣿⣟⣋⣉⣠⣤⣾⣿⣟⣻⣍⠀⠀',
|
||||
-- '⢹⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⠋⠀⠀⠀⠀⠀',
|
||||
-- '⠈⢻⣿⣿⣿⡿⠿⠿⠿⠛⠉⠀⠀⠀⠀⠀⢀⣠⣴⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀',
|
||||
-- '⠀⠀⠙⢿⣿⣿⣶⣦⣤⣤⣤⣤⣤⣴⣶⣿⣿⣿⣿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀',
|
||||
-- '⠀⠀⠀⠀⠈⠙⠛⠛⠿⠿⠿⠿⠿⠛⠛⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
|
||||
-- '',
|
||||
-- }
|
||||
|
||||
|
||||
-- db.custom_header = {
|
||||
-- " :h- Nhy` ",
|
||||
-- " -mh. h. `Ndho ",
|
||||
-- " hmh+ oNm. oNdhh ",
|
||||
-- " `Nmhd` /NNmd /NNhhd ",
|
||||
-- " -NNhhy `hMNmmm`+NNdhhh ",
|
||||
-- " .NNmhhs ```....`..-:/./mNdhhh+ ",
|
||||
-- " mNNdhhh- `.-::///+++////++//:--.`-/sd` ",
|
||||
-- " oNNNdhhdo..://++//++++++/+++//++///++/-.` ",
|
||||
-- " y. `mNNNmhhhdy+/++++//+/////++//+++///++////-` `/oos: ",
|
||||
-- " . Nmy: :NNNNmhhhhdy+/++/+++///:.....--:////+++///:.`:s+ ",
|
||||
-- " h- dNmNmy oNNNNNdhhhhy:/+/+++/- ---:/+++//++//.` ",
|
||||
-- " hd+` -NNNy`./dNNNNNhhhh+-:///// -+oo:` ::-:+////++///:` ",
|
||||
-- " /Nmhs+oss-:++/dNNNmhho:--::/// /mmmmmo ../-///++///////. ",
|
||||
-- " oNNdhhhhhhhs//osso/:---:::/// /yyyyso ..o+-//////////:/. ",
|
||||
-- " /mNNNmdhhhh/://+///:::////// -:::- ..+sy+:////////::/:/. ",
|
||||
-- " /hNNNdhhs--:/+++////++/////. ..-/yhhs-/////////::/::/` ",
|
||||
-- " .ooo+/-::::/+///////++++//-/ossyyhhhhs/:///////:::/::::/: ",
|
||||
-- " -///:::::::////++///+++/////:/+ooo+/::///////.::://::---+` ",
|
||||
-- " /////+//++++/////+////-..//////////::-:::--`.:///:---:::/: ",
|
||||
-- " //+++//++++++////+++///::-- .::::-------:: ",
|
||||
-- " :/++++///////////++++//////. -:/:----::../- ",
|
||||
-- " -/++++//++///+////////////// .::::---:::-.+` ",
|
||||
-- " `////////////////////////////:. --::-----...-/ ",
|
||||
-- " -///://////////////////////::::-.. :-:-:-..-::.`.+` ",
|
||||
-- " :/://///:///::://::://::::::/:::::::-:---::-.-....``/- - ",
|
||||
-- " ::::://::://::::::::::::::----------..-:....`.../- -+oo/ ",
|
||||
-- " -/:::-:::::---://:-::-::::----::---.-.......`-/. ``",
|
||||
-- " s-`::--:::------:////----:---.-:::...-.....`./: ",
|
||||
-- " yMNy.`::-.--::..-dmmhhhs-..-.-.......`.....-/:` ",
|
||||
-- " oMNNNh. `-::--...:NNNdhhh/.--.`..``.......:/- ",
|
||||
-- " :dy+:` .-::-..NNNhhd+``..`...````.-::-` ",
|
||||
-- " .-:mNdhh:.......--::::-` ",
|
||||
-- " yNh/..------..` ",
|
||||
-- " ",
|
||||
-- "N E O V I M - v " .. version.major .. "." .. version.minor,
|
||||
-- }
|
||||
-- db.custom_header = {
|
||||
-- '',
|
||||
-- ' ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣭⣿⣶⣿⣦⣼⣆ ',
|
||||
-- ' ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ',
|
||||
-- ' ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷⠄⠄⠄⠄⠻⠿⢿⣿⣧⣄ ',
|
||||
-- ' ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ',
|
||||
-- ' ⢠⣿⣿⣿⠈ ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ',
|
||||
-- ' ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘⠄ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ',
|
||||
-- ' ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ',
|
||||
-- ' ⣠⣿⠿⠛⠄⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ',
|
||||
-- ' ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇⠄⠛⠻⢷⣄ ',
|
||||
-- ' ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ',
|
||||
-- ' ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ',
|
||||
-- ' ⢰⣶ ⣶ ⢶⣆⢀⣶⠂⣶⡶⠶⣦⡄⢰⣶⠶⢶⣦ ⣴⣶ ',
|
||||
-- ' ⢸⣿⠶⠶⣿ ⠈⢻⣿⠁ ⣿⡇ ⢸⣿⢸⣿⢶⣾⠏ ⣸⣟⣹⣧ ',
|
||||
-- ' ⠸⠿ ⠿ ⠸⠿ ⠿⠷⠶⠿⠃⠸⠿⠄⠙⠷⠤⠿⠉⠉⠿⠆ ',
|
||||
-- '',
|
||||
-- }
|
||||
-- db.custom_header = {
|
||||
-- [[ ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣭⣿⣶⣿⣦⣼⣆ ]],
|
||||
-- [[ ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ]],
|
||||
-- [[ ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷⠄⠄⠄⠄⠻⠿⢿⣿⣧⣄ ]],
|
||||
-- [[ ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ]],
|
||||
-- [[ ⢠⣿⣿⣿⠈ ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ]],
|
||||
-- [[ ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘⠄ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ]],
|
||||
-- [[ ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ]],
|
||||
-- [[ ⣠⣿⠿⠛⠄⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ]],
|
||||
-- [[ ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇⠄⠛⠻⢷⣄ ]],
|
||||
-- [[ ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ]],
|
||||
-- [[ ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ]],
|
||||
-- [[ ⢰⣶ ⣶ ⢶⣆⢀⣶⠂⣶⡶⠶⣦⡄⢰⣶⠶⢶⣦ ⣴⣶ ]],
|
||||
-- [[ ⢸⣿⠶⠶⣿ ⠈⢻⣿⠁ ⣿⡇ ⢸⣿⢸⣿⢶⣾⠏ ⣸⣟⣹⣧ ]],
|
||||
-- [[ ⠸⠿ ⠿ ⠸⠿ ⠿⠷⠶⠿⠃⠸⠿⠄⠙⠷⠤⠿⠉⠉⠿⠆ ]],
|
||||
-- }
|
||||
|
||||
-- vim.g.dashboard_default_executive = 'telescope'
|
||||
-- vim.g.dashboard_custom_header = {
|
||||
-- [[ ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣭⣿⣶⣿⣦⣼⣆ ]],
|
||||
-- [[ ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ]],
|
||||
-- [[ ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷⠄⠄⠄⠄⠻⠿⢿⣿⣧⣄ ]],
|
||||
-- [[ ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ]],
|
||||
-- [[ ⢠⣿⣿⣿⠈ ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ]],
|
||||
-- [[ ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘⠄ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ]],
|
||||
-- [[ ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ]],
|
||||
-- [[ ⣠⣿⠿⠛⠄⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ]],
|
||||
-- [[ ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇⠄⠛⠻⢷⣄ ]],
|
||||
-- [[ ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ]],
|
||||
-- [[ ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ]],
|
||||
-- [[ ⢰⣶ ⣶ ⢶⣆⢀⣶⠂⣶⡶⠶⣦⡄⢰⣶⠶⢶⣦ ⣴⣶ ]],
|
||||
-- [[ ⢸⣿⠶⠶⣿ ⠈⢻⣿⠁ ⣿⡇ ⢸⣿⢸⣿⢶⣾⠏ ⣸⣟⣹⣧ ]],
|
||||
-- [[ ⠸⠿ ⠿ ⠸⠿ ⠿⠷⠶⠿⠃⠸⠿⠄⠙⠷⠤⠿⠉⠉⠿⠆ ]],
|
||||
-- }
|
||||
--
|
||||
-- vim.g.dashboard_custom_section = {
|
||||
-- a = {description = {' Find File '}, command = 'Telescope find_files'},
|
||||
-- d = {description = {' Search Text '}, command = 'Telescope live_grep'},
|
||||
-- c = {description = {' New File '}, command = 'DashboardNewFile'},
|
||||
-- b = {description = {' Recent Files '}, command = 'Telescope oldfiles'},
|
||||
-- -- e = {description = {' Config '}, command = 'edit ~/.config/nvim/init.lua'},
|
||||
-- }
|
||||
-- vim.g.dashboard_custom_footer = {'Do one thing, do it well - Unix Philosophy'}
|
||||
local icon_color = "Function"
|
||||
db.custom_center = {
|
||||
{
|
||||
desc = "Find File ",
|
||||
shortcut = "f",
|
||||
icon = " ",
|
||||
icon_hl = { link = icon_color },
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "Recents ",
|
||||
shortcut = "r",
|
||||
icon = " ",
|
||||
icon_hl = { link = icon_color },
|
||||
action = "Telescope oldfiles",
|
||||
},
|
||||
|
||||
{
|
||||
desc = "Browse Files ",
|
||||
shortcut = ".",
|
||||
icon = " ",
|
||||
icon_hl = { link = icon_color },
|
||||
action = "Telescope file_browser"
|
||||
},
|
||||
-- { shortcut = "<leader>fg", icon = " ", desc = "Find Word", action = "Telescope live_grep" },
|
||||
|
||||
{
|
||||
desc = "New File ",
|
||||
shortcut = "n",
|
||||
icon = " ",
|
||||
icon_hl = { link = icon_color },
|
||||
action = "DashboardNewFile",
|
||||
},
|
||||
|
||||
-- { shortcut = "<leader>fm", icon = " ", desc = "Bookmark", action = "Telescope marks" },
|
||||
{
|
||||
desc = "Load Last Session ",
|
||||
shortcut = "L",
|
||||
icon = " ",
|
||||
icon_hl = { link = icon_color },
|
||||
action = "SessionLoad",
|
||||
},
|
||||
|
||||
{
|
||||
desc = "Update Plugins ",
|
||||
shortcut = "u",
|
||||
icon = " ",
|
||||
icon_hl = { link = icon_color },
|
||||
action = "PackerUpdate",
|
||||
},
|
||||
{
|
||||
desc = "Setting ",
|
||||
shortcut = "s",
|
||||
icon = " ",
|
||||
icon_hl = { link = icon_color },
|
||||
action = "edit $MYVIMRC",
|
||||
},
|
||||
{
|
||||
desc = "Exit ",
|
||||
shortcut = "q",
|
||||
icon = " ",
|
||||
icon_hl = { link = icon_color },
|
||||
action = "exit",
|
||||
},
|
||||
}
|
||||
|
||||
db.custom_footer = { "type :help<Enter> or <F1> for on-line help" }
|
||||
|
||||
|
||||
vim.api.nvim_create_autocmd('Filetype', {
|
||||
pattern = 'dashboard',
|
||||
group = vim.api.nvim_create_augroup('Dashboard_au', { clear = true }),
|
||||
callback = function()
|
||||
vim.cmd [[
|
||||
hi! link DashboardFooter NonText
|
||||
setlocal buftype=nofile
|
||||
setlocal nonumber norelativenumber nocursorline noruler
|
||||
nnoremap <buffer> f <cmd>Telescope find_files<CR>
|
||||
nnoremap <buffer> r <cmd>Telescope oldfiles<CR>
|
||||
nnoremap <buffer> . <cmd>Telescope file_browser<CR>
|
||||
nnoremap <buffer> n <cmd>DashboardNewFile<CR>
|
||||
nnoremap <buffer> <leader>en <cmd>DashboardNewFile<CR>
|
||||
nnoremap <buffer> L <cmd>SessionLoad<CR>
|
||||
nnoremap <buffer> u <cmd>PackerUpdate<CR>
|
||||
nnoremap <buffer> s <cmd>edit $MYVIMRC<CR>
|
||||
nnoremap <buffer> q <cmd>exit<CR>
|
||||
]]
|
||||
end
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
'stevearc/dressing.nvim',
|
||||
config = function()
|
||||
require('dressing').setup({
|
||||
input = {
|
||||
-- Options for input UI
|
||||
},
|
||||
select = {
|
||||
backend = { 'telescope', 'fzf_lua', 'fzf', 'builtin' },
|
||||
builtin = {
|
||||
border = 'rounded',
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
return {
|
||||
-- 'williamboman/mason-lspconfig.nvim',
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, bufopts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.format, bufopts)
|
||||
end
|
||||
|
||||
local lsp_flags = {
|
||||
-- This is the default in Nvim 0.7+
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
|
||||
require 'lspconfig'.lua_ls.setup {
|
||||
on_init = function(client)
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.loop.fs_stat(path .. '/.luarc.json') or vim.loop.fs_stat(path .. '/.luarc.jsonc') then
|
||||
return
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT'
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
-- Depending on the usage, you might want to add additional paths here.
|
||||
-- "${3rd}/luv/library"
|
||||
-- "${3rd}/busted/library",
|
||||
}
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
|
||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||
}
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {}
|
||||
}
|
||||
}
|
||||
|
||||
require 'lspconfig'.prismals.setup {}
|
||||
|
||||
require 'lspconfig'.svelte.setup {}
|
||||
|
||||
require 'lspconfig'.grammarly.setup {
|
||||
filetypes = { "markdown" }
|
||||
}
|
||||
|
||||
require 'lspconfig'.tailwindcss.setup({
|
||||
filetypes = { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", "slim", "twig", "css", "less", "postcss", "sass", "scss", "stylus", "sugarss", "javascript", "javascriptreact", "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "templ" },
|
||||
})
|
||||
|
||||
require 'lspconfig'.eslint.setup({
|
||||
--- ...
|
||||
on_attach = function(client, bufnr)
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
buffer = bufnr,
|
||||
command = "EslintFixAll",
|
||||
})
|
||||
end,
|
||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro" },
|
||||
})
|
||||
|
||||
require 'lspconfig'.emmet_ls.setup({
|
||||
-- on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "css", "eruby", "html", "javascript", "javascriptreact", "less", "sass", "scss", "svelte", "pug", "typescriptreact", "vue" },
|
||||
init_options = {
|
||||
html = {
|
||||
options = {
|
||||
-- For possible options, see: https://github.com/emmetio/emmet/blob/master/src/config.ts#L79-L267
|
||||
["bem.enabled"] = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
require 'lspconfig'.prismals.setup {}
|
||||
|
||||
require 'lspconfig'.biome.setup {}
|
||||
|
||||
require 'lspconfig'.bashls.setup {}
|
||||
|
||||
require 'lspconfig'.docker_compose_language_service.setup {}
|
||||
|
||||
require("lspconfig").dockerls.setup {
|
||||
settings = {
|
||||
docker = {
|
||||
languageserver = {
|
||||
formatter = {
|
||||
ignoreMultilineInstructions = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require('lspconfig')['pyright'].setup {
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
}
|
||||
require('lspconfig')['tsserver'].setup {
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
}
|
||||
require('lspconfig')['rust_analyzer'].setup {
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
-- Server-specific settings...
|
||||
settings = {
|
||||
["rust-analyzer"] = {}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
return {
|
||||
"nvimdev/lspsaga.nvim",
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter', -- optional
|
||||
'nvim-tree/nvim-web-devicons', -- optional
|
||||
},
|
||||
config = function()
|
||||
local keymap = vim.keymap.set
|
||||
local saga = require('lspsaga')
|
||||
|
||||
-- saga.init_lsp_saga()
|
||||
|
||||
-- Lsp finder find the symbol definition implement reference
|
||||
-- if there is no implement it will hide
|
||||
-- when you use action in finder like open vsplit then you can
|
||||
-- use <C-t> to jump back
|
||||
keymap("n", "gh", "<cmd>Lspsaga lsp_finder<CR>", { silent = true })
|
||||
|
||||
-- Code action
|
||||
keymap({ "n", "v" }, "<leader>ca", "<cmd>Lspsaga code_action<CR>", { silent = true })
|
||||
|
||||
-- Rename
|
||||
keymap("n", "gr", "<cmd>Lspsaga rename<CR>", { silent = true })
|
||||
|
||||
-- Peek Definition
|
||||
-- you can edit the definition file in this flaotwindow
|
||||
-- also support open/vsplit/etc operation check definition_action_keys
|
||||
-- support tagstack C-t jump back
|
||||
keymap("n", "gd", "<cmd>Lspsaga peek_definition<CR>", { silent = true })
|
||||
|
||||
-- Show line diagnostics
|
||||
keymap("n", "<leader>cd", "<cmd>Lspsaga show_line_diagnostics<CR>", { silent = true })
|
||||
|
||||
-- Show cursor diagnostic
|
||||
keymap("n", "<leader>cd", "<cmd>Lspsaga show_cursor_diagnostics<CR>", { silent = true })
|
||||
|
||||
-- Diagnsotic jump can use `<c-o>` to jump back
|
||||
keymap("n", "[e", "<cmd>Lspsaga diagnostic_jump_prev<CR>", { silent = true })
|
||||
keymap("n", "]e", "<cmd>Lspsaga diagnostic_jump_next<CR>", { silent = true })
|
||||
|
||||
-- Only jump to error
|
||||
keymap("n", "[E", function()
|
||||
require("lspsaga.diagnostic").goto_prev({ severity = vim.diagnostic.severity.ERROR })
|
||||
end, { silent = true })
|
||||
keymap("n", "]E", function()
|
||||
require("lspsaga.diagnostic").goto_next({ severity = vim.diagnostic.severity.ERROR })
|
||||
end, { silent = true })
|
||||
|
||||
-- Outline
|
||||
keymap("n", "<leader>o", "<cmd>LSoutlineToggle<CR>", { silent = true })
|
||||
|
||||
-- Hover Doc
|
||||
keymap("n", "K", "<cmd>Lspsaga hover_doc<CR>", { silent = true })
|
||||
|
||||
-- Float terminal
|
||||
keymap("n", "<A-d>", "<cmd>Lspsaga open_floaterm<CR>", { silent = true })
|
||||
-- if you want pass somc cli command into terminal you can do like this
|
||||
-- open lazygit in lspsaga float terminal
|
||||
keymap("n", "<A-d>", "<cmd>Lspsaga open_floaterm lazygit<CR>", { silent = true })
|
||||
-- close floaterm
|
||||
keymap("t", "<A-d>", [[<C-\><C-n><cmd>Lspsaga close_floaterm<CR>]], { silent = true })
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = 'kyazdani42/nvim-web-devicons',
|
||||
config = function()
|
||||
require 'lualine'.setup()
|
||||
|
||||
-- require('lualine').setup({
|
||||
-- options = {
|
||||
-- theme = function()
|
||||
-- local colors = {
|
||||
-- darkgray = "#16161d",
|
||||
-- gray = "#727169",
|
||||
-- innerbg = nil,
|
||||
-- outerbg = "#16161D",
|
||||
-- normal = "#7e9cd8",
|
||||
-- insert = "#98bb6c",
|
||||
-- visual = "#ffa066",
|
||||
-- replace = "#e46876",
|
||||
-- command = "#e6c384",
|
||||
-- }
|
||||
-- return {
|
||||
-- inactive = {
|
||||
-- a = { fg = colors.gray, bg = colors.outerbg, gui = "bold" },
|
||||
-- b = { fg = colors.gray, bg = colors.outerbg },
|
||||
-- c = { fg = colors.gray, bg = colors.innerbg },
|
||||
-- },
|
||||
-- visual = {
|
||||
-- a = { fg = colors.darkgray, bg = colors.visual, gui = "bold" },
|
||||
-- b = { fg = colors.gray, bg = colors.outerbg },
|
||||
-- c = { fg = colors.gray, bg = colors.innerbg },
|
||||
-- },
|
||||
-- replace = {
|
||||
-- a = { fg = colors.darkgray, bg = colors.replace, gui = "bold" },
|
||||
-- b = { fg = colors.gray, bg = colors.outerbg },
|
||||
-- c = { fg = colors.gray, bg = colors.innerbg },
|
||||
-- },
|
||||
-- normal = {
|
||||
-- a = { fg = colors.darkgray, bg = colors.normal, gui = "bold" },
|
||||
-- b = { fg = colors.gray, bg = colors.outerbg },
|
||||
-- c = { fg = colors.gray, bg = colors.innerbg },
|
||||
-- },
|
||||
-- insert = {
|
||||
-- a = { fg = colors.darkgray, bg = colors.insert, gui = "bold" },
|
||||
-- b = { fg = colors.gray, bg = colors.outerbg },
|
||||
-- c = { fg = colors.gray, bg = colors.innerbg },
|
||||
-- },
|
||||
-- command = {
|
||||
-- a = { fg = colors.darkgray, bg = colors.command, gui = "bold" },
|
||||
-- b = { fg = colors.gray, bg = colors.outerbg },
|
||||
-- c = { fg = colors.gray, bg = colors.innerbg },
|
||||
-- },
|
||||
-- }
|
||||
-- end
|
||||
-- },
|
||||
-- })
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
-- require 'mason'.setup()
|
||||
-- require 'mason-lspconfig'.setup({
|
||||
-- ensure_installed = { "sumneko_lua", "rust_analyzer" }
|
||||
-- })
|
||||
@@ -0,0 +1,287 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
},
|
||||
config = function()
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
|
||||
popup_border_style = "rounded",
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
|
||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
||||
sort_function = nil, -- use a custom function for sorting files and directories in the tree
|
||||
-- sort_function = function (a,b)
|
||||
-- if a.type == b.type then
|
||||
-- return a.path > b.path
|
||||
-- else
|
||||
-- return a.type > b.type
|
||||
-- end
|
||||
-- end , -- this sorts files and directories descendantly
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1, -- extra padding on left hand side
|
||||
-- indent guides
|
||||
with_markers = true,
|
||||
indent_marker = "│",
|
||||
last_indent_marker = "└",
|
||||
highlight = "NeoTreeIndentMarker",
|
||||
-- expander config, needed for nesting files
|
||||
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
icon = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
folder_empty = "",
|
||||
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
||||
-- then these will never be used.
|
||||
default = "*",
|
||||
highlight = "NeoTreeFileIcon"
|
||||
},
|
||||
modified = {
|
||||
symbol = "[+]",
|
||||
highlight = "NeoTreeModified",
|
||||
},
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = "NeoTreeFileName",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
-- Change type
|
||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||
deleted = "✖", -- this can only be used in the git_status source
|
||||
renamed = "", -- this can only be used in the git_status source
|
||||
-- Status type
|
||||
untracked = "",
|
||||
ignored = "",
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
conflict = "",
|
||||
}
|
||||
},
|
||||
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
|
||||
file_size = {
|
||||
enabled = true,
|
||||
required_width = 64, -- min width of window required to show this column
|
||||
},
|
||||
type = {
|
||||
enabled = true,
|
||||
required_width = 122, -- min width of window required to show this column
|
||||
},
|
||||
last_modified = {
|
||||
enabled = true,
|
||||
required_width = 88, -- min width of window required to show this column
|
||||
},
|
||||
created = {
|
||||
enabled = true,
|
||||
required_width = 110, -- min width of window required to show this column
|
||||
},
|
||||
symlink_target = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
-- A list of functions, each representing a global custom command
|
||||
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
|
||||
-- see `:h neo-tree-custom-commands-global`
|
||||
commands = {},
|
||||
window = {
|
||||
position = "left",
|
||||
width = 30,
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
nowait = true,
|
||||
},
|
||||
mappings = {
|
||||
-- ["<C-o>"] = { "toggle" },
|
||||
["<space>"] = {
|
||||
"toggle_node",
|
||||
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
|
||||
},
|
||||
["<2-LeftMouse>"] = "open",
|
||||
["l"] = "open",
|
||||
["<esc>"] = "cancel", -- close preview or floating neo-tree window
|
||||
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } },
|
||||
-- Read `# Preview Mode` for more information
|
||||
["<cr>"] = "focus_preview",
|
||||
["S"] = "open_split",
|
||||
["s"] = "open_vsplit",
|
||||
-- ["S"] = "split_with_window_picker",
|
||||
-- ["s"] = "vsplit_with_window_picker",
|
||||
["t"] = "open_tabnew",
|
||||
-- ["<cr>"] = "open_drop",
|
||||
-- ["t"] = "open_tab_drop",
|
||||
["w"] = "open_with_window_picker",
|
||||
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
|
||||
["h"] = "close_node",
|
||||
-- ['C'] = 'close_all_subnodes',
|
||||
["z"] = "close_all_nodes",
|
||||
--["Z"] = "expand_all_nodes",
|
||||
["a"] = {
|
||||
"add",
|
||||
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
|
||||
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
|
||||
config = {
|
||||
show_path = "none" -- "none", "relative", "absolute"
|
||||
}
|
||||
},
|
||||
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
|
||||
["d"] = "delete",
|
||||
["r"] = "rename",
|
||||
["y"] = "copy_to_clipboard",
|
||||
["x"] = "cut_to_clipboard",
|
||||
["p"] = "paste_from_clipboard",
|
||||
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
|
||||
-- ["c"] = {
|
||||
-- "copy",
|
||||
-- config = {
|
||||
-- show_path = "none" -- "none", "relative", "absolute"
|
||||
-- }
|
||||
--}
|
||||
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
|
||||
["q"] = "close_window",
|
||||
["R"] = "refresh",
|
||||
["?"] = "show_help",
|
||||
["<"] = "prev_source",
|
||||
[">"] = "next_source",
|
||||
["i"] = "show_file_details",
|
||||
}
|
||||
},
|
||||
nesting_rules = {},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = true,
|
||||
hide_gitignored = true,
|
||||
hide_hidden = true, -- only works on Windows for hidden files/directories
|
||||
hide_by_name = {
|
||||
--"node_modules"
|
||||
},
|
||||
hide_by_pattern = { -- uses glob style patterns
|
||||
--"*.meta",
|
||||
--"*/src/*/tsconfig.json",
|
||||
},
|
||||
always_show = { -- remains visible even if other settings would normally hide it
|
||||
--".gitignored",
|
||||
},
|
||||
always_show_by_pattern = { -- uses glob style patterns
|
||||
--".env*",
|
||||
},
|
||||
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
|
||||
--".DS_Store",
|
||||
--"thumbs.db"
|
||||
},
|
||||
never_show_by_pattern = { -- uses glob style patterns
|
||||
--".null-ls_*",
|
||||
},
|
||||
},
|
||||
follow_current_file = {
|
||||
enabled = false, -- This will find and focus the file in the active buffer every time
|
||||
-- -- the current file is changed while the tree is open.
|
||||
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
||||
},
|
||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
||||
-- in whatever position is specified in window.position
|
||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||
-- window like netrw would, regardless of window.position
|
||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
||||
-- instead of relying on nvim autocmd events.
|
||||
window = {
|
||||
mappings = {
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
["H"] = "toggle_hidden",
|
||||
["/"] = "fuzzy_finder",
|
||||
["D"] = "fuzzy_finder_directory",
|
||||
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
|
||||
-- ["D"] = "fuzzy_sorter_directory",
|
||||
["f"] = "filter_on_submit",
|
||||
["<c-x>"] = "clear_filter",
|
||||
["[g"] = "prev_git_modified",
|
||||
["]g"] = "next_git_modified",
|
||||
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["og"] = { "order_by_git_status", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
-- ['<key>'] = function(state) ... end,
|
||||
},
|
||||
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
|
||||
["j"] = "move_cursor_down",
|
||||
["<C-n>"] = "move_cursor_down",
|
||||
["k"] = "move_cursor_up",
|
||||
["<C-p>"] = "move_cursor_up",
|
||||
-- ['<key>'] = function(state, scroll_padding) ... end,
|
||||
},
|
||||
},
|
||||
|
||||
commands = {} -- Add a custom command or override a global one using the same function name
|
||||
},
|
||||
buffers = {
|
||||
follow_current_file = {
|
||||
enabled = true, -- This will find and focus the file in the active buffer every time
|
||||
-- -- the current file is changed while the tree is open.
|
||||
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
||||
},
|
||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||
show_unloaded = true,
|
||||
window = {
|
||||
mappings = {
|
||||
["bd"] = "buffer_delete",
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
}
|
||||
},
|
||||
},
|
||||
git_status = {
|
||||
window = {
|
||||
position = "float",
|
||||
mappings = {
|
||||
["A"] = "git_add_all",
|
||||
["gu"] = "git_unstage_file",
|
||||
["ga"] = "git_add_file",
|
||||
["gr"] = "git_revert_file",
|
||||
["gc"] = "git_commit",
|
||||
["gp"] = "git_push",
|
||||
["gg"] = "git_commit_and_push",
|
||||
["o"] = { "show_help", nowait = false, config = { title = "Order by", prefix_key = "o" } },
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd([[nnoremap \ :Neotree reveal<cr>]])
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- add any options here
|
||||
},
|
||||
dependencies = {
|
||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- OPTIONAL:
|
||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||
-- If not available, we use `mini` as the fallback
|
||||
"rcarriga/nvim-notify",
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
return {
|
||||
'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
},
|
||||
config = function()
|
||||
local cmp = require 'cmp'
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<Tab>'] = cmp.mapping(cmp.mapping.select_next_item()),
|
||||
['<C-j>'] = cmp.mapping(cmp.mapping.select_next_item()),
|
||||
['<C-k>'] = cmp.mapping(cmp.mapping.select_prev_item()),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'vsnip' }, -- For vsnip users.
|
||||
-- { name = 'luasnip' }, -- For luasnip users.
|
||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
||||
-- { name = 'snippy' }, -- For snippy users.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
-- require("transparent").setup({
|
||||
-- -- enable = true, -- boolean: enable transparent
|
||||
-- extra_groups = { -- table/string: additional groups that should be cleared
|
||||
-- -- In particular, when you set it to 'all', that means all available groups
|
||||
--
|
||||
-- -- example of akinsho/nvim-bufferline.lua
|
||||
-- "BufferLineTabClose",
|
||||
-- "BufferlineBufferSelected",
|
||||
-- "BufferLineFill",
|
||||
-- "BufferLineBackground",
|
||||
-- "BufferLineSeparator",
|
||||
-- "BufferLineIndicatorSelected",
|
||||
-- },
|
||||
-- exclude_groups = {}, -- table: groups you don't want to clear
|
||||
-- })
|
||||
@@ -0,0 +1,68 @@
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
|
||||
config = function()
|
||||
-- examples for your init.lua
|
||||
-- vim.api.nvim_set_keymap('n', '<C-o>', ':NvimTreeToggle<CR>', { noremap = true, silent = true })
|
||||
|
||||
local function my_on_attach(bufnr)
|
||||
local api = require "nvim-tree.api"
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
-- default mappings
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
|
||||
-- custom mappings
|
||||
vim.keymap.set('n', '<C-t>', api.tree.change_root_to_parent, opts('Up'))
|
||||
vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help'))
|
||||
end
|
||||
|
||||
require("nvim-tree").setup({
|
||||
on_attach = my_on_attach,
|
||||
view = {
|
||||
adaptive_size = true,
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {
|
||||
{ key = "l", action = "edit", action_cb = edit_or_open },
|
||||
{ key = "L", action = "vsplit_preview", action_cb = vsplit_preview },
|
||||
{ key = "h", action = "close_node" },
|
||||
{ key = "H", action = "collapse_all", action_cb = collapse_all }
|
||||
}
|
||||
},
|
||||
},
|
||||
-- actions = {
|
||||
-- open_file = {
|
||||
-- quit_on_open = true
|
||||
-- }
|
||||
-- }
|
||||
|
||||
-- sort_by = "case_sensitive",
|
||||
-- view = {
|
||||
-- mappings = {
|
||||
-- list = {
|
||||
-- { key = "u", action = "dir_up" },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- renderer = {
|
||||
-- group_empty = true,
|
||||
-- },
|
||||
-- filters = {
|
||||
-- dotfiles = true,
|
||||
-- },
|
||||
--
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
nested = true,
|
||||
callback = function()
|
||||
if #vim.api.nvim_list_wins() == 1 and require("nvim-tree.utils").is_nvim_tree_buf() then
|
||||
vim.cmd "quit"
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
return {
|
||||
"navarasu/onedark.nvim",
|
||||
config = function()
|
||||
require('onedark').setup {
|
||||
-- Main options --
|
||||
style = 'dark', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
|
||||
transparent = true, -- Show/hide background
|
||||
term_colors = true, -- Change terminal color as per the selected theme style
|
||||
ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden
|
||||
cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
|
||||
|
||||
-- toggle theme style ---
|
||||
toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
|
||||
toggle_style_list = { 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light' }, -- List of styles to toggle between
|
||||
|
||||
-- Change code style ---
|
||||
-- Options are italic, bold, underline, none
|
||||
-- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
|
||||
code_style = {
|
||||
comments = 'italic',
|
||||
keywords = 'none',
|
||||
functions = 'none',
|
||||
strings = 'none',
|
||||
variables = 'none'
|
||||
},
|
||||
|
||||
-- Custom Highlights --
|
||||
colors = {}, -- Override default colors
|
||||
highlights = {}, -- Override highlight groups
|
||||
|
||||
-- Plugins Config --
|
||||
diagnostics = {
|
||||
darker = true, -- darker colors for diagnostic
|
||||
undercurl = true, -- use undercurl instead of underline for diagnostics
|
||||
background = true, -- use background color for virtual text
|
||||
},
|
||||
}
|
||||
require('onedark').setup {
|
||||
style = 'darker'
|
||||
}
|
||||
require('onedark').load()
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
config = function()
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"petertriho/nvim-scrollbar",
|
||||
config = function()
|
||||
-- local colors = require("tokyonight.colors").setup()
|
||||
|
||||
-- require("scrollbar").setup({
|
||||
-- handle = {
|
||||
-- color = colors.bg_highlight,
|
||||
-- },
|
||||
-- marks = {
|
||||
-- Search = { color = colors.orange },
|
||||
-- Error = { color = colors.error },
|
||||
-- Warn = { color = colors.warning },
|
||||
-- Info = { color = colors.info },
|
||||
-- Hint = { color = colors.hint },
|
||||
-- Misc = { color = colors.purple },
|
||||
-- }
|
||||
-- })
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
return {
|
||||
'Shatur/neovim-session-manager',
|
||||
dependencies = { 'plenary.nvim' }, -- if you install parsers with `nvim-treesitter`
|
||||
config = function()
|
||||
local Path = require('plenary.path')
|
||||
local config = require('session_manager.config')
|
||||
|
||||
-- Configuration du plugin
|
||||
require('session_manager').setup({
|
||||
sessions_dir = Path:new(vim.fn.stdpath('data'), 'sessions'), -- Le répertoire où les fichiers de session seront sauvegardés.
|
||||
autoload_mode = config.AutoloadMode.LastSession, -- Définit quoi faire lorsque Neovim est démarré sans arguments. Voir la section "Autoload mode" ci-dessous.
|
||||
autosave_last_session = true, -- Sauvegarder automatiquement la dernière session à la sortie et lors du changement de session.
|
||||
autosave_ignore_not_normal = true, -- Le plugin ne sauvegardera pas une session lorsqu'aucun buffer n'est ouvert ou que tous ne sont pas modifiables ou listés.
|
||||
autosave_ignore_dirs = {}, -- Liste des répertoires où la session ne sera pas autosauvegardée.
|
||||
autosave_ignore_filetypes = { -- Tous les buffers de ces types de fichiers seront fermés avant que la session ne soit sauvegardée.
|
||||
'gitcommit',
|
||||
'gitrebase',
|
||||
},
|
||||
autosave_ignore_buftypes = {}, -- Tous les buffers de ces types de buffers seront fermés avant que la session ne soit sauvegardée.
|
||||
autosave_only_in_session = false, -- Toujours autosauvegarder la session. Si vrai, autosauvegarde uniquement après qu'une session soit active.
|
||||
max_path_length = 80, -- Raccourcit le chemin affiché si la longueur dépasse ce seuil. Utiliser 0 pour ne pas raccourcir le chemin du tout.
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<C-g>', builtin.live_grep, {})
|
||||
vim.keymap.set('n', 'fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', 'fh', builtin.help_tags, {})
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
-- Telescope configuration options
|
||||
},
|
||||
|
||||
-- open telescope instead of empty buffer
|
||||
-- vim.api.nvim_create_autocmd("VimEnter", {
|
||||
-- callback = function()
|
||||
-- if vim.fn.argv(0) == "" then
|
||||
-- require("telescope.builtin").find_files()
|
||||
-- end
|
||||
-- end,
|
||||
-- })
|
||||
}
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
return {
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- vim.tokyonight_transparent_sidebar = true
|
||||
-- vim.tokyonight_transparent = true
|
||||
-- vim.opt.background = "dark"
|
||||
vim.cmd("colorscheme tokyonight")
|
||||
|
||||
require("tokyonight").setup({
|
||||
transparent = true, -- Enable this to disable setting the background color
|
||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||
sidebars = "transparent", -- style for sidebars, see below
|
||||
floats = "transparent", -- style for floating windows
|
||||
-- use the night style
|
||||
-- style = "night",
|
||||
-- disable italic for functions
|
||||
styles = {
|
||||
functions = {}
|
||||
},
|
||||
-- Change the "hint" color to the "orange" color, and make the "error" color bright red
|
||||
on_colors = function(colors)
|
||||
colors.hint = colors.orange
|
||||
colors.error = "#ff0000"
|
||||
end
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
config = function()
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
-- List of parsers to ignore installing (or "all")
|
||||
ignore_install = { "javascript" },
|
||||
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
disable = { "c", "rust" },
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
|
||||
end
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
'Wansmer/treesj',
|
||||
keys = {
|
||||
{ "J", "<cmd>TSJToggle<cr>", desc = "Join Toggle" },
|
||||
'<space>m',
|
||||
'<space>j',
|
||||
'<space>s',
|
||||
},
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' }, -- if you install parsers with `nvim-treesitter`
|
||||
config = function()
|
||||
require('treesj').setup({ --[[ your config ]] })
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
'psliwka/vim-smoothie',
|
||||
config = function()
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
'dylanaraps/wal.vim',
|
||||
config = function()
|
||||
vim.cmd("colorscheme wal")
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user