Initial Commit
This commit is contained in:
10
init.lua
Normal file
10
init.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Rebind leader to space
|
||||
vim.keymap.set("n", "<Space>", "<Nop>", { noremap = true, silent = true })
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
require("config.lazy")
|
||||
|
||||
require("config.options")
|
||||
require("config.mappings")
|
||||
require("config.autocmd")
|
||||
32
lazy-lock.json
Normal file
32
lazy-lock.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
|
||||
"LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
|
||||
"catppuccin": { "branch": "main", "commit": "384f304c8b04664c9e0091fbfb3923c5f97c1bcf" },
|
||||
"chezmoi.nvim": { "branch": "main", "commit": "ad26a6c4f5be0c348612518fcb1b7116649e026f" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "c9317c2a8629d4e39e7cf47be74cb67f3ab37cda" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "11f730caa976a00def4387cbacb6183cec7939c7" },
|
||||
"nvim-origami": { "branch": "main", "commit": "e5b527f41d18c2ee5af868e1a3939b60f15fdb90" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "e16cd38962bc40c22a51ee004aa4f43726d74a16" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "e3c18ddd27a853f85a6f513a864cf4f2982b9f26" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" },
|
||||
"themery.nvim": { "branch": "main", "commit": "bfa58f4b279d21cb515b28023e1b68ec908584b2" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
24
lua/config/autocmd.lua
Normal file
24
lua/config/autocmd.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||
callback = function()
|
||||
vim.opt.number = false
|
||||
vim.opt.relativenumber = true
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
callback = function()
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = false
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
|
||||
pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" },
|
||||
callback = function(ev)
|
||||
local bufnr = ev.buf
|
||||
local edit_watch = function()
|
||||
require("chezmoi.commands.__edit").watch(bufnr)
|
||||
end
|
||||
vim.schedule(edit_watch)
|
||||
end,
|
||||
})
|
||||
35
lua/config/lazy.lua
Normal file
35
lua/config/lazy.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- 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({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
62
lua/config/mappings.lua
Normal file
62
lua/config/mappings.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
local function map(m, k, v)
|
||||
vim.keymap.set(m, k, v, { noremap = true, silent = true})
|
||||
end
|
||||
|
||||
-- Basic File Manip
|
||||
map("n","<leader>w","<Cmd>write<CR>")
|
||||
|
||||
-- Window movement
|
||||
map("n", "<C-h>", "<C-w>h")
|
||||
map("n", "<C-j>", "<C-w>j")
|
||||
map("n", "<C-k>", "<C-w>k")
|
||||
map("n", "<C-l>", "<C-w>l")
|
||||
|
||||
-- Neo-Tree
|
||||
map("n", "<leader>e", "<Cmd>NvimTreeToggle<CR>")
|
||||
|
||||
-- Telescope
|
||||
map("n", "<leader>ff", "<Cmd>Telescope find_files<CR>")
|
||||
map("n", "<leader>fg", "<Cmd>Telescope live_grep<CR>")
|
||||
|
||||
-- Buffer Navigation w/ shift + left/right
|
||||
map("n", "<S-l>", "<Cmd>bnext<CR>")
|
||||
map("n", "<S-h>", "<Cmd>bprevious<CR>")
|
||||
|
||||
-- Close and Force Close Buffer
|
||||
map("n", "<leader>q", "<Cmd>BufferClose<CR>")
|
||||
map("n", "<leader>Q", "<Cmd>BufferClose!<CR>")
|
||||
|
||||
-- Reorder Buffers w/ alt + shift + left/right
|
||||
map('n', '<AS-h>', '<Cmd>BufferMovePrevious<CR>')
|
||||
map('n', '<AS-l>', '<Cmd>BufferMoveNext<CR>')
|
||||
|
||||
-- Jump To Buffer with alt
|
||||
-- TODO!!
|
||||
|
||||
-- Pin Buffer with alt+p
|
||||
map('n', '<A-p>', '<Cmd>BufferPin<CR>')
|
||||
|
||||
-- Open FTerm
|
||||
map('n', '<leader>z', ":lua require('FTerm').open()<CR>")
|
||||
map('t', '<Esc>', '<C-\\><C-n><CMD>lua require("FTerm").close()<CR>') --preserves session
|
||||
|
||||
-- Change Theme
|
||||
map("n", "<leader>p", "<Cmd>Themery<CR>") --cycle themes
|
||||
|
||||
-- LSP
|
||||
map("n", "K", vim.lsp.buf.hover)
|
||||
map("n", "gd", vim.lsp.buf.definition)
|
||||
map("n", "<leader>ca", vim.lsp.buf.code_action)
|
||||
|
||||
-- Formatting
|
||||
map("n", "<leader>gf", vim.lsp.buf.format)
|
||||
|
||||
-- Toggle rel/abs line numbers
|
||||
map("n", "<leader>nn", function()
|
||||
if vim.wo.relativenumber then
|
||||
vim.wo.relativenumber = false
|
||||
vim.wo.number = true
|
||||
else
|
||||
vim.wo.relativenumber = true
|
||||
end
|
||||
end)
|
||||
41
lua/config/options.lua
Normal file
41
lua/config/options.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
local options = {
|
||||
-- Make text not wrap because its annoying
|
||||
wrap = false,
|
||||
|
||||
-- Set nvim to use terminal colors
|
||||
termguicolors = true,
|
||||
|
||||
-- Highlight line cursor is on
|
||||
cursorline = true,
|
||||
|
||||
-- Enable absolute and relative line numbers
|
||||
number = true,
|
||||
relativenumber = true,
|
||||
|
||||
-- Indentation
|
||||
tabstop = 4,
|
||||
shiftwidth = 4,
|
||||
expandtab = true,
|
||||
smartindent = true,
|
||||
|
||||
winborder = "rounded",
|
||||
|
||||
-- Bind yank and put to wl-clipboard
|
||||
clipboard = "unnamedplus",
|
||||
|
||||
updatetime = 250,
|
||||
|
||||
swapfile = false,
|
||||
|
||||
foldmethod = "manual"
|
||||
}
|
||||
|
||||
for k, v in pairs(options) do
|
||||
vim.opt[k] = v
|
||||
end
|
||||
|
||||
-- Diagnostics Setup
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
virtual_lines = true,
|
||||
})
|
||||
25
lua/plugins/autopairs.lua
Normal file
25
lua/plugins/autopairs.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup({
|
||||
disable_in_macro = true, -- disable when recording or executing a macro
|
||||
disable_in_visualblock = false, -- disable when insert after visual block mode
|
||||
disable_in_replace_mode = true,
|
||||
ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=],
|
||||
enable_moveright = true,
|
||||
enable_afterquote = true, -- add bracket pairs after quote
|
||||
enable_check_bracket_line = true, --- check bracket in same line
|
||||
enable_bracket_in_quote = true, --
|
||||
enable_abbr = false, -- trigger abbreviation
|
||||
break_undo = true, -- switch for basic rule break undo sequence
|
||||
check_ts = false,
|
||||
map_cr = true,
|
||||
map_bs = true, -- map the <BS> key
|
||||
map_c_h = false, -- Map the <C-h> key to delete a pair
|
||||
map_c_w = false, -- map <c-w> to delete a pair if possible
|
||||
})
|
||||
end
|
||||
-- use opts = {} for passing setup options
|
||||
-- this is equivalent to setup({}) function
|
||||
}
|
||||
19
lua/plugins/barbar.lua
Normal file
19
lua/plugins/barbar.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = {
|
||||
"lewis6991/gitsigns.nvim", -- OPTIONAL: for git status
|
||||
"nvim-tree/nvim-web-devicons", -- OPTIONAL: for file icons
|
||||
},
|
||||
init = function()
|
||||
vim.g.barbar_auto_setup = false
|
||||
end,
|
||||
opts = {
|
||||
animation = false,
|
||||
clickable = false,
|
||||
|
||||
sidebar_filetypes = {
|
||||
NvimTree = true,
|
||||
},
|
||||
},
|
||||
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
||||
}
|
||||
11
lua/plugins/chezmoi.lua
Normal file
11
lua/plugins/chezmoi.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"xvzc/chezmoi.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("chezmoi").setup({
|
||||
edit = {
|
||||
watch = true,
|
||||
}
|
||||
})
|
||||
end,
|
||||
}
|
||||
25
lua/plugins/colorscheme.lua
Normal file
25
lua/plugins/colorscheme.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("catppuccin").setup({
|
||||
flavor = "mocha",
|
||||
|
||||
float = {
|
||||
transparent = true
|
||||
}
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("gruvbox").setup({
|
||||
-- Gruvbox Configure
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
7
lua/plugins/comment.lua
Normal file
7
lua/plugins/comment.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
config = function()
|
||||
require("Comment").setup({})
|
||||
end,
|
||||
}
|
||||
|
||||
36
lua/plugins/completions.lua
Normal file
36
lua/plugins/completions.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4), -- Up
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4), -- Down
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "luasnip" },
|
||||
{ name = "nvim_lsp" },
|
||||
}),
|
||||
})
|
||||
end,
|
||||
}
|
||||
5
lua/plugins/fterm.lua
Normal file
5
lua/plugins/fterm.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"numToStr/FTerm.nvim",
|
||||
config = function()
|
||||
end
|
||||
}
|
||||
35
lua/plugins/lsp.lua
Normal file
35
lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
local function configure_lsp(server, config)
|
||||
vim.lsp.config(server, config)
|
||||
vim.lsp.enable(server)
|
||||
end
|
||||
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
vim.lsp.inlay_hint.enable(true)
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
configure_lsp("lua_ls", {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
configure_lsp("pyright", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
configure_lsp("jdtls", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
configure_lsp("marksman", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
}
|
||||
11
lua/plugins/lualine.lua
Normal file
11
lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
theme = 'ayu_mirage'
|
||||
}
|
||||
})
|
||||
end,
|
||||
}
|
||||
21
lua/plugins/mason.lua
Normal file
21
lua/plugins/mason.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"rust_analyzer",
|
||||
"pyright",
|
||||
"jdtls",
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
}
|
||||
16
lua/plugins/neo-tree.lua
Normal file
16
lua/plugins/neo-tree.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup({
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
}
|
||||
})
|
||||
|
||||
end,
|
||||
}
|
||||
13
lua/plugins/none-ls.lua
Normal file
13
lua/plugins/none-ls.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.mdformat,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
11
lua/plugins/origami.lua
Normal file
11
lua/plugins/origami.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"chrisgrieser/nvim-origami",
|
||||
event = "VeryLazy",
|
||||
config = function ()
|
||||
require("origami").setup({})
|
||||
end,
|
||||
init = function ()
|
||||
vim.opt.foldlevel = 99
|
||||
vim.opt.foldlevelstart = 99
|
||||
end
|
||||
}
|
||||
7
lua/plugins/render-markdown.lua
Normal file
7
lua/plugins/render-markdown.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("render-markdown").setup({})
|
||||
end,
|
||||
}
|
||||
23
lua/plugins/telescope.lua
Normal file
23
lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim', version = '*',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
-- optional but recommended
|
||||
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
|
||||
}
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({})
|
||||
}
|
||||
}
|
||||
})
|
||||
require("telescope").load_extension("ui-select")
|
||||
end
|
||||
}
|
||||
}
|
||||
30
lua/plugins/themery.lua
Normal file
30
lua/plugins/themery.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
return {
|
||||
"zaldih/themery.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("themery").setup({
|
||||
themes = {
|
||||
{
|
||||
name = "Catppuccin",
|
||||
colorscheme = "catppuccin",
|
||||
before = [[
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
after = [[
|
||||
require("lualine").setup({ options = { theme = "ayu_mirage" } })
|
||||
]]
|
||||
},
|
||||
{
|
||||
name = "Gruvbox",
|
||||
colorscheme = "gruvbox",
|
||||
before = [[
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
after = [[
|
||||
require("lualine").setup({ options = { theme = "gruvbox" } })
|
||||
]]
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
17
lua/plugins/treesitter.lua
Normal file
17
lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
lazy = false,
|
||||
branch = 'master',
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
configs.setup({
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
autotag = { enable = true },
|
||||
ensure_installed = {
|
||||
"lua", "c", "rust", "python", "java"
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
21
lua/plugins/which-key.lua
Normal file
21
lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.add({
|
||||
|
||||
{ "<leader>e", desc = "Explorer" },
|
||||
|
||||
{ "<leader>ff", desc = "Find files" },
|
||||
{ "<leader>fg", desc = "Live grep" },
|
||||
|
||||
{ "<leader>q", desc = "Close buffer" },
|
||||
{ "<leader>Q", desc = "Force close buffer" },
|
||||
|
||||
{ "<leader>nn", desc = "Toggle relative numbers" },
|
||||
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user