feat: nvim config
This commit is contained in:
parent
ef61597a06
commit
03507560de
23 changed files with 685 additions and 328 deletions
|
|
@ -10,16 +10,6 @@
|
||||||
withRuby = true;
|
withRuby = true;
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
# LSP servers installed via Nix
|
|
||||||
lua-language-server
|
|
||||||
nil
|
|
||||||
pyright
|
|
||||||
nodePackages.typescript
|
|
||||||
nodePackages.typescript-language-server
|
|
||||||
rust-analyzer
|
|
||||||
gopls
|
|
||||||
clang-tools
|
|
||||||
|
|
||||||
# Formatters
|
# Formatters
|
||||||
stylua
|
stylua
|
||||||
nixfmt
|
nixfmt
|
||||||
|
|
|
||||||
8
modules/home/rsydn/programs/nvim/.gitignore
vendored
8
modules/home/rsydn/programs/nvim/.gitignore
vendored
|
|
@ -1,8 +0,0 @@
|
||||||
tt.*
|
|
||||||
.tests
|
|
||||||
doc/tags
|
|
||||||
debug
|
|
||||||
.repro
|
|
||||||
foo.*
|
|
||||||
*.log
|
|
||||||
data
|
|
||||||
27
modules/home/rsydn/programs/nvim/.luarc.json
Normal file
27
modules/home/rsydn/programs/nvim/.luarc.json
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||||
|
"runtime": {
|
||||||
|
"version": "LuaJIT",
|
||||||
|
"path": [
|
||||||
|
"lua/?.lua",
|
||||||
|
"lua/?/init.lua"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"diagnostics": {
|
||||||
|
"globals": ["vim"]
|
||||||
|
},
|
||||||
|
"workspace": {
|
||||||
|
"library": [
|
||||||
|
"${3rd}/luv/library",
|
||||||
|
"${3rd}/busted/library",
|
||||||
|
"${3rd}/luassert/library"
|
||||||
|
],
|
||||||
|
"checkThirdParty": false
|
||||||
|
},
|
||||||
|
"completion": {
|
||||||
|
"callSnippet": "Replace"
|
||||||
|
},
|
||||||
|
"telemetry": {
|
||||||
|
"enable": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"neodev": {
|
|
||||||
"library": {
|
|
||||||
"enabled": true,
|
|
||||||
"plugins": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"neoconf": {
|
|
||||||
"plugins": {
|
|
||||||
"lua_ls": {
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,201 +0,0 @@
|
||||||
Apache License
|
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
||||||
|
|
||||||
1. Definitions.
|
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
|
||||||
the copyright owner that is granting the License.
|
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
|
||||||
other entities that control, are controlled by, or are under common
|
|
||||||
control with that entity. For the purposes of this definition,
|
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
# 💤 LazyVim
|
|
||||||
|
|
||||||
A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
|
|
||||||
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
|
|
||||||
|
|
@ -1,2 +1,5 @@
|
||||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
-- Load configuration
|
||||||
|
require("config.options")
|
||||||
|
require("config.keymaps")
|
||||||
|
require("config.autocmds")
|
||||||
require("config.lazy")
|
require("config.lazy")
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
-- Autocmds are automatically loaded on the VeryLazy event
|
-- Essential autocommands (minimal)
|
||||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
--
|
|
||||||
-- Add any additional autocmds here
|
-- Highlight on yank
|
||||||
-- with `vim.api.nvim_create_autocmd`
|
autocmd("TextYankPost", {
|
||||||
--
|
callback = function()
|
||||||
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
vim.highlight.on_yank()
|
||||||
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
end,
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
-- Keymaps are automatically loaded on the VeryLazy event
|
-- Essential keymaps (minimal improvements over default Vim)
|
||||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
local keymap = vim.keymap
|
||||||
-- Add any additional keymaps here
|
|
||||||
|
-- Clear search highlight with <esc>
|
||||||
|
keymap.set("n", "<esc>", "<cmd>noh<cr>", { desc = "Clear search highlight" })
|
||||||
|
|
||||||
|
-- Better indenting (stay in visual mode)
|
||||||
|
keymap.set("v", "<", "<gv")
|
||||||
|
keymap.set("v", ">", ">gv")
|
||||||
|
|
|
||||||
|
|
@ -13,38 +13,27 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- add LazyVim and import its plugins
|
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
|
||||||
-- import/override with your plugins
|
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
|
{ import = "config.lazyvim" },
|
||||||
},
|
},
|
||||||
-- Put the lockfile somewhere writable when the config directory is managed by Nix
|
|
||||||
lockfile = vim.fn.stdpath("state") .. "/lazy-lock.json",
|
|
||||||
defaults = {
|
install = { colorscheme = { "gruvbox", "habamax" } },
|
||||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
|
||||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
checker = { enabled = false },
|
||||||
lazy = false,
|
change_detection = { notify = false },
|
||||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
|
||||||
-- have outdated releases, which may break your Neovim install.
|
|
||||||
version = false, -- always use the latest git commit
|
|
||||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
|
||||||
},
|
|
||||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
|
||||||
checker = {
|
|
||||||
enabled = true, -- check for plugin updates periodically
|
|
||||||
notify = false, -- notify on update
|
|
||||||
}, -- automatically check for plugin updates
|
|
||||||
performance = {
|
performance = {
|
||||||
rtp = {
|
rtp = {
|
||||||
-- disable some rtp plugins
|
|
||||||
disabled_plugins = {
|
disabled_plugins = {
|
||||||
"gzip",
|
"gzip",
|
||||||
-- "matchit",
|
"matchit",
|
||||||
-- "matchparen",
|
"matchparen",
|
||||||
-- "netrwPlugin",
|
"netrwPlugin",
|
||||||
"tarPlugin",
|
"tarPlugin",
|
||||||
"tohtml",
|
"tohtml",
|
||||||
"tutor",
|
"tutor",
|
||||||
|
|
|
||||||
70
modules/home/rsydn/programs/nvim/lua/config/lazyvim/lsp.lua
Normal file
70
modules/home/rsydn/programs/nvim/lua/config/lazyvim/lsp.lua
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
-- Enable language servers defined in nvim-lspconfig using the Nvim 0.11 API.
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"mason-org/mason.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
|
local ensure = {
|
||||||
|
"clangd",
|
||||||
|
"gopls",
|
||||||
|
"lua-language-server",
|
||||||
|
"nil",
|
||||||
|
"pyright",
|
||||||
|
"rust-analyzer",
|
||||||
|
"typescript-language-server",
|
||||||
|
}
|
||||||
|
for _, tool in ipairs(ensure) do
|
||||||
|
if not vim.tbl_contains(opts.ensure_installed, tool) then
|
||||||
|
table.insert(opts.ensure_installed, tool)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.servers = vim.tbl_deep_extend(
|
||||||
|
"force",
|
||||||
|
{
|
||||||
|
lua_ls = {},
|
||||||
|
nil_ls = {},
|
||||||
|
pyright = {},
|
||||||
|
ts_ls = {},
|
||||||
|
rust_analyzer = {},
|
||||||
|
gopls = {},
|
||||||
|
clangd = {},
|
||||||
|
},
|
||||||
|
opts.servers or {}
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
if vim.fn.has("nvim-0.11") == 0 then
|
||||||
|
vim.notify("nvim-lspconfig requires Neovim 0.11+ for vim.lsp.config", vim.log.levels.ERROR)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
for name, server_opts in pairs(opts.servers or {}) do
|
||||||
|
if server_opts ~= false then
|
||||||
|
local config = type(server_opts) == "table" and vim.deepcopy(server_opts) or {}
|
||||||
|
|
||||||
|
if config.enabled ~= false then
|
||||||
|
config.enabled = nil
|
||||||
|
|
||||||
|
-- Integrate blink.cmp capabilities with LSP
|
||||||
|
local has_blink, blink = pcall(require, "blink.cmp")
|
||||||
|
if has_blink then
|
||||||
|
config.capabilities = blink.get_lsp_capabilities(config.capabilities)
|
||||||
|
end
|
||||||
|
|
||||||
|
if next(config) ~= nil then
|
||||||
|
vim.lsp.config(name, config)
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.lsp.enable(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,38 @@
|
||||||
-- Options are automatically loaded before lazy.nvim startup
|
-- Minimal essential options
|
||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
local opt = vim.opt
|
||||||
-- Add any additional options here
|
|
||||||
|
-- Leader keys
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
-- Line numbers
|
||||||
|
opt.number = true
|
||||||
|
opt.relativenumber = true
|
||||||
|
|
||||||
|
-- Indentation
|
||||||
|
opt.tabstop = 2
|
||||||
|
opt.shiftwidth = 2
|
||||||
|
opt.expandtab = true
|
||||||
|
opt.smartindent = true
|
||||||
|
|
||||||
|
-- Search
|
||||||
|
opt.ignorecase = true
|
||||||
|
opt.smartcase = true
|
||||||
|
|
||||||
|
-- UI
|
||||||
|
opt.termguicolors = true
|
||||||
|
opt.signcolumn = "yes"
|
||||||
|
opt.cursorline = true
|
||||||
|
|
||||||
|
-- Splits
|
||||||
|
opt.splitbelow = true
|
||||||
|
opt.splitright = true
|
||||||
|
|
||||||
|
-- Clipboard
|
||||||
|
opt.clipboard = "unnamedplus"
|
||||||
|
|
||||||
|
-- Undo
|
||||||
|
opt.undofile = true
|
||||||
|
|
||||||
|
-- Mouse
|
||||||
|
opt.mouse = "a"
|
||||||
|
|
|
||||||
84
modules/home/rsydn/programs/nvim/lua/plugins/coding.lua
Normal file
84
modules/home/rsydn/programs/nvim/lua/plugins/coding.lua
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
return {
|
||||||
|
-- Auto pairs
|
||||||
|
-- Automatically inserts a matching closing character
|
||||||
|
-- when you type an opening character like `"`, `[`, or `(`.
|
||||||
|
{
|
||||||
|
"nvim-mini/mini.pairs",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
modes = { insert = true, command = true, terminal = false },
|
||||||
|
-- skip autopair when next character is one of these
|
||||||
|
skip_next = [=[[%w%%%'%[%"%%.%`%$]]=],
|
||||||
|
-- skip autopair when the cursor is inside these treesitter nodes
|
||||||
|
skip_ts = { "string" },
|
||||||
|
-- skip autopair when next character is closing pair
|
||||||
|
-- and there are more closing pairs than opening pairs
|
||||||
|
skip_unbalanced = true,
|
||||||
|
-- better deal with markdown code blocks
|
||||||
|
markdown = true,
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
LazyVim.mini.pairs(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Improves comment syntax, lets Neovim handle multiple
|
||||||
|
-- types of comments for a single language, and relaxes rules
|
||||||
|
-- for uncommenting.
|
||||||
|
{
|
||||||
|
"folke/ts-comments.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Extends the a & i text objects, this adds the ability to select
|
||||||
|
-- arguments, function calls, text within quotes and brackets
|
||||||
|
{
|
||||||
|
"nvim-mini/mini.ai",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
local ai = require("mini.ai")
|
||||||
|
return {
|
||||||
|
n_lines = 500,
|
||||||
|
custom_textobjects = {
|
||||||
|
o = ai.gen_spec.treesitter({
|
||||||
|
a = { "@block.outer", "@conditional.outer", "@loop.outer" },
|
||||||
|
i = { "@block.inner", "@conditional.inner", "@loop.inner" },
|
||||||
|
}),
|
||||||
|
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }),
|
||||||
|
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }),
|
||||||
|
t = { "<(%p%w-)%f[^<%w][^<>]->.*()</[^/]->$" },
|
||||||
|
d = { "%f[%d]%d+" },
|
||||||
|
e = { { "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]" }, "^().*()$" },
|
||||||
|
g = LazyVim.mini.ai_buffer,
|
||||||
|
u = ai.gen_spec.function_call(),
|
||||||
|
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
require("mini.ai").setup(opts)
|
||||||
|
LazyVim.on_load("which-key.nvim", function()
|
||||||
|
vim.schedule(function()
|
||||||
|
LazyVim.mini.ai_whichkey(opts)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Configures LuaLS to support auto-completion and type checking
|
||||||
|
-- while editing your Neovim configuration.
|
||||||
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
|
ft = "lua",
|
||||||
|
cmd = "LazyDev",
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim.uv" } },
|
||||||
|
{ path = "LazyVim", words = { "LazyVim" } },
|
||||||
|
{ path = "snacks.nvim", words = { "Snacks" } },
|
||||||
|
{ path = "lazy.nvim", words = { "LazyVim" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,15 +1,71 @@
|
||||||
return {
|
return {
|
||||||
|
-- gruvbox
|
||||||
{
|
{
|
||||||
"ellisonleao/gruvbox.nvim",
|
"ellisonleao/gruvbox.nvim",
|
||||||
|
lazy = true,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- tokyonight
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = true,
|
||||||
|
opts = { style = "moon" },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- catppuccin
|
||||||
|
{
|
||||||
|
"catppuccin/nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
name = "catppuccin",
|
||||||
opts = {
|
opts = {
|
||||||
terminal_colors = true,
|
lsp_styles = {
|
||||||
transparent_mode = false,
|
underlines = {
|
||||||
|
errors = { "undercurl" },
|
||||||
|
hints = { "undercurl" },
|
||||||
|
warnings = { "undercurl" },
|
||||||
|
information = { "undercurl" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- integrations = {
|
||||||
|
-- aerial = true,
|
||||||
|
-- alpha = true,
|
||||||
|
-- cmp = true,
|
||||||
|
-- dashboard = true,
|
||||||
|
-- flash = true,
|
||||||
|
-- fzf = true,
|
||||||
|
-- grug_far = true,
|
||||||
|
-- gitsigns = true,
|
||||||
|
-- headlines = true,
|
||||||
|
-- illuminate = true,
|
||||||
|
-- indent_blankline = { enabled = true },
|
||||||
|
-- leap = true,
|
||||||
|
-- lsp_trouble = true,
|
||||||
|
-- mason = true,
|
||||||
|
-- mini = true,
|
||||||
|
-- navic = { enabled = true, custom_bg = "lualine" },
|
||||||
|
-- neotest = true,
|
||||||
|
-- neotree = true,
|
||||||
|
-- noice = true,
|
||||||
|
-- notify = true,
|
||||||
|
-- snacks = true,
|
||||||
|
-- telescope = true,
|
||||||
|
-- treesitter_context = true,
|
||||||
|
-- which_key = true,
|
||||||
|
-- },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
-- specs = {
|
||||||
require("gruvbox").setup(opts)
|
-- {
|
||||||
vim.o.background = "dark"
|
-- "akinsho/bufferline.nvim",
|
||||||
vim.cmd.colorscheme("gruvbox")
|
-- optional = true,
|
||||||
end,
|
-- opts = function(_, opts)
|
||||||
|
-- if (vim.g.colors_name or ""):find("catppuccin") then
|
||||||
|
-- opts.highlights = require("catppuccin.special.bufferline").get_theme()
|
||||||
|
-- end
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
44
modules/home/rsydn/programs/nvim/lua/plugins/completion.lua
Normal file
44
modules/home/rsydn/programs/nvim/lua/plugins/completion.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
return {
|
||||||
|
-- Modern completion engine with built-in fuzzy matching
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
dependencies = {
|
||||||
|
"rafamadriz/friendly-snippets",
|
||||||
|
},
|
||||||
|
version = "1.*",
|
||||||
|
event = "InsertEnter",
|
||||||
|
opts = {
|
||||||
|
-- Keymap preset options: 'default' | 'super-tab' | 'enter'
|
||||||
|
keymap = { preset = "default" },
|
||||||
|
|
||||||
|
appearance = {
|
||||||
|
-- Use mono nerd font variant
|
||||||
|
nerd_font_variant = "mono",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Default completion sources
|
||||||
|
sources = {
|
||||||
|
default = { "lsp", "path", "snippets", "buffer" },
|
||||||
|
},
|
||||||
|
|
||||||
|
completion = {
|
||||||
|
documentation = {
|
||||||
|
auto_show = true,
|
||||||
|
auto_show_delay_ms = 500,
|
||||||
|
},
|
||||||
|
menu = {
|
||||||
|
draw = {
|
||||||
|
columns = { { "label", "label_description", gap = 1 }, { "kind_icon", "kind" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Fuzzy matching implementation
|
||||||
|
-- Options: "prefer_rust_with_warning" | "rust" | "lua"
|
||||||
|
fuzzy = {
|
||||||
|
implementation = "prefer_rust_with_warning",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
return {
|
||||||
|
-- Telescope - Fuzzy finder over lists
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
tag = "0.1.8",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
cmd = "Telescope",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
||||||
|
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live Grep" },
|
||||||
|
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Buffers" },
|
||||||
|
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help Tags" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-h>"] = "which_key",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Telescope FZF native - Better sorting performance
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
build = "make",
|
||||||
|
dependencies = { "nvim-telescope/telescope.nvim" },
|
||||||
|
config = function()
|
||||||
|
require("telescope").load_extension("fzf")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Neo-tree - File explorer tree
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
cmd = "Neotree",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>e", "<cmd>Neotree toggle<cr>", desc = "Toggle Neo-tree" },
|
||||||
|
{ "<leader>o", "<cmd>Neotree focus<cr>", desc = "Focus Neo-tree" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
filesystem = {
|
||||||
|
follow_current_file = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
use_libuv_file_watcher = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
48
modules/home/rsydn/programs/nvim/lua/plugins/linting.lua
Normal file
48
modules/home/rsydn/programs/nvim/lua/plugins/linting.lua
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
event = { "BufReadPost", "BufNewFile", "BufWritePost" },
|
||||||
|
opts = {
|
||||||
|
events = { "BufWritePost", "BufReadPost", "InsertLeave" },
|
||||||
|
linters_by_ft = {
|
||||||
|
-- Add linters per filetype here
|
||||||
|
-- fish = { "fish" },
|
||||||
|
-- javascript = { "eslint_d" },
|
||||||
|
-- python = { "ruff" },
|
||||||
|
},
|
||||||
|
linters = {},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local lint = require("lint")
|
||||||
|
|
||||||
|
-- Merge custom linter configs
|
||||||
|
for name, linter in pairs(opts.linters) do
|
||||||
|
if type(linter) == "table" and type(lint.linters[name]) == "table" then
|
||||||
|
lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name], linter)
|
||||||
|
else
|
||||||
|
lint.linters[name] = linter
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
lint.linters_by_ft = opts.linters_by_ft
|
||||||
|
|
||||||
|
-- Debounced lint function
|
||||||
|
local function debounce_lint()
|
||||||
|
local timer = vim.uv.new_timer()
|
||||||
|
return function()
|
||||||
|
timer:start(100, 0, vim.schedule_wrap(lint.try_lint))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local lint_fn = debounce_lint()
|
||||||
|
|
||||||
|
-- Create autocommand for linting
|
||||||
|
vim.api.nvim_create_autocmd(opts.events, {
|
||||||
|
group = vim.api.nvim_create_augroup("nvim-lint", { clear = true }),
|
||||||
|
callback = function()
|
||||||
|
lint_fn()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
-- Declare language servers provided via Nix so LazyVim skips Mason installs.
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"mason-org/mason.nvim",
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.ensure_installed = {}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.servers = opts.servers or {}
|
|
||||||
local servers = {
|
|
||||||
lua_ls = { mason = false },
|
|
||||||
nil_ls = { mason = false },
|
|
||||||
pyright = { mason = false },
|
|
||||||
tsserver = { mason = false },
|
|
||||||
rust_analyzer = { mason = false },
|
|
||||||
gopls = { mason = false },
|
|
||||||
clangd = { mason = false },
|
|
||||||
}
|
|
||||||
|
|
||||||
for server, server_opts in pairs(servers) do
|
|
||||||
local existing = opts.servers[server] or {}
|
|
||||||
opts.servers[server] = vim.tbl_deep_extend("force", existing, server_opts)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
-- Override mini.pick with the new repository location
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"nvim-mini/mini.pick",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
return {
|
|
||||||
{
|
|
||||||
"sphamba/smear-cursor.nvim",
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
42
modules/home/rsydn/programs/nvim/lua/plugins/treesitter.lua
Normal file
42
modules/home/rsydn/programs/nvim/lua/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
version = false,
|
||||||
|
build = ":TSUpdate",
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
|
||||||
|
opts = {
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
ensure_installed = {
|
||||||
|
"bash",
|
||||||
|
"c",
|
||||||
|
"diff",
|
||||||
|
"html",
|
||||||
|
"javascript",
|
||||||
|
"jsdoc",
|
||||||
|
"json",
|
||||||
|
"jsonc",
|
||||||
|
"lua",
|
||||||
|
"luadoc",
|
||||||
|
"luap",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
|
"printf",
|
||||||
|
"python",
|
||||||
|
"query",
|
||||||
|
"regex",
|
||||||
|
"toml",
|
||||||
|
"tsx",
|
||||||
|
"typescript",
|
||||||
|
"vim",
|
||||||
|
"vimdoc",
|
||||||
|
"xml",
|
||||||
|
"yaml",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
174
modules/home/rsydn/programs/nvim/lua/plugins/ui.lua
Normal file
174
modules/home/rsydn/programs/nvim/lua/plugins/ui.lua
Normal file
|
|
@ -0,0 +1,174 @@
|
||||||
|
return {
|
||||||
|
-- Better UI for messages, cmdline and the popupmenu
|
||||||
|
{
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
lsp = {
|
||||||
|
override = {
|
||||||
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
|
["cmp.entry.get_documentation"] = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
routes = {
|
||||||
|
{
|
||||||
|
filter = {
|
||||||
|
event = "msg_show",
|
||||||
|
any = {
|
||||||
|
{ find = "%d+L, %d+B" },
|
||||||
|
{ find = "; after #%d+" },
|
||||||
|
{ find = "; before #%d+" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
view = "mini",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
presets = {
|
||||||
|
bottom_search = true,
|
||||||
|
command_palette = true,
|
||||||
|
long_message_to_split = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>sn", "", desc = "+noice" },
|
||||||
|
{ "<leader>snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" },
|
||||||
|
{ "<leader>snh", function() require("noice").cmd("history") end, desc = "Noice History" },
|
||||||
|
{ "<leader>sna", function() require("noice").cmd("all") end, desc = "Noice All" },
|
||||||
|
{ "<leader>snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Statusline
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = function()
|
||||||
|
return {
|
||||||
|
options = {
|
||||||
|
theme = "auto",
|
||||||
|
globalstatus = true,
|
||||||
|
disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } },
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { "mode" },
|
||||||
|
lualine_b = { "branch" },
|
||||||
|
lualine_c = {
|
||||||
|
{
|
||||||
|
"diagnostics",
|
||||||
|
symbols = {
|
||||||
|
error = " ",
|
||||||
|
warn = " ",
|
||||||
|
info = " ",
|
||||||
|
hint = " ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||||
|
{ "filename", path = 1, symbols = { modified = " ", readonly = "", unnamed = "" } },
|
||||||
|
},
|
||||||
|
lualine_x = {
|
||||||
|
{
|
||||||
|
"diff",
|
||||||
|
symbols = {
|
||||||
|
added = " ",
|
||||||
|
modified = " ",
|
||||||
|
removed = " ",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_y = {
|
||||||
|
{ "progress", separator = " ", padding = { left = 1, right = 0 } },
|
||||||
|
{ "location", padding = { left = 0, right = 1 } },
|
||||||
|
},
|
||||||
|
lualine_z = {
|
||||||
|
function()
|
||||||
|
return " " .. os.date("%R")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extensions = { "lazy" },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Bufferline
|
||||||
|
{
|
||||||
|
"akinsho/bufferline.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle Pin" },
|
||||||
|
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Delete Non-Pinned Buffers" },
|
||||||
|
{ "<leader>bo", "<Cmd>BufferLineCloseOthers<CR>", desc = "Delete Other Buffers" },
|
||||||
|
{ "<leader>br", "<Cmd>BufferLineCloseRight<CR>", desc = "Delete Buffers to the Right" },
|
||||||
|
{ "<leader>bl", "<Cmd>BufferLineCloseLeft<CR>", desc = "Delete Buffers to the Left" },
|
||||||
|
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
|
||||||
|
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
||||||
|
{ "[b", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev Buffer" },
|
||||||
|
{ "]b", "<cmd>BufferLineCycleNext<cr>", desc = "Next Buffer" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
close_command = function(n) require("mini.bufremove").delete(n, false) end,
|
||||||
|
right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end,
|
||||||
|
diagnostics = "nvim_lsp",
|
||||||
|
always_show_bufferline = false,
|
||||||
|
offsets = {
|
||||||
|
{
|
||||||
|
filetype = "neo-tree",
|
||||||
|
text = "Neo-tree",
|
||||||
|
highlight = "Directory",
|
||||||
|
text_align = "left",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"nvim-mini/mini.bufremove",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>bd", function() require("mini.bufremove").delete(0, false) end, desc = "Delete Buffer" },
|
||||||
|
{ "<leader>bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" },
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Indent guides
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
indent = {
|
||||||
|
char = "│",
|
||||||
|
tab_char = "│",
|
||||||
|
},
|
||||||
|
scope = { show_start = false, show_end = false },
|
||||||
|
exclude = {
|
||||||
|
filetypes = {
|
||||||
|
"help",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"neo-tree",
|
||||||
|
"Trouble",
|
||||||
|
"trouble",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"notify",
|
||||||
|
"toggleterm",
|
||||||
|
"lazyterm",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
main = "ibl",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Icons
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 2
|
|
||||||
column_width = 120
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue