feat(nvim): add mini plugins, smart open and formatting
This commit is contained in:
@@ -1,37 +1,38 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "2737edc9e674e537dc0a97e3405658d57d2d31ed" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "247df216704cbe3cfa68e2ae5515c3485e281364" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "4c959cf65c5420d54b24b61a77b681dcfca0bc57" },
|
||||
"color-picker.nvim": { "branch": "master", "commit": "06cb5f853535dea529a523e9a0e8884cdf9eba4d" },
|
||||
"conform.nvim": { "branch": "master", "commit": "70019124aa4f2e6838be9fbd2007f6d13b27a96d" },
|
||||
"coq.artifacts": { "branch": "artifacts", "commit": "a1ffcee295905171d87b40ee456001d45b10329b" },
|
||||
"coq.thirdparty": { "branch": "3p", "commit": "a827c2ab76d7c803976765cac597c79a2a5b34f6" },
|
||||
"coq_nvim": { "branch": "coq", "commit": "db12581bea4e83b8d8142c15daa9632d796636cf" },
|
||||
"crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" },
|
||||
"everforest-nvim": { "branch": "main", "commit": "7c57941d5ef5a150f307b9295c00a59e95d78587" },
|
||||
"fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "b1134ab82ee4279e31f7ddf7e34b2a99eb9b7bc9" },
|
||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "ab2a3413646fedd77aa0eab4214a6473e62f6a64" },
|
||||
"coq.thirdparty": { "branch": "3p", "commit": "12ce499eddf83b524e0540f6fa2e49dcaec6060c" },
|
||||
"coq_nvim": { "branch": "coq", "commit": "976012b0c13763a47edbd55492ba53b03b498cdd" },
|
||||
"crates.nvim": { "branch": "main", "commit": "bd35b13e94a292ee6e32c351e05ca2202dc9f070" },
|
||||
"everforest-nvim": { "branch": "main", "commit": "616864c0c534b1eaf650ef913512dcde80ababfb" },
|
||||
"fzf-lua": { "branch": "main", "commit": "af6ecbd7f421e7894127a9e94b40e13172fbfb13" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "68114837e81ca16d06514c3a997c9102d1b25c15" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
|
||||
"mini.nvim": { "branch": "main", "commit": "890db26e37bb28d8a95f05570dd0d9fa757b698b" },
|
||||
"noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "d01864641c6e43c681c3e9f6cf4745c75fdd9dcc" },
|
||||
"nvim-possession": { "branch": "main", "commit": "fcc6e00ffb13b7c7945560af8bf025184f795c95" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "425b58968340bd5b4621c2a0d626c73556516d3d" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "a2a334900d3643de585ac5c6140b03403454124f" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
|
||||
"nvim-lint": { "branch": "master", "commit": "dfa45de973c3ce7bd1b9a6d346f896a68ad07e44" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "88157521e890fe7fdf18bee22438875edd6300a6" },
|
||||
"nvim-notify": { "branch": "master", "commit": "a3020c2cf4dfc4c4f390c4a21e84e35e46cf5d17" },
|
||||
"nvim-possession": { "branch": "main", "commit": "d82907c1fc40d249c6db0c01fb6c6938a0d07dee" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "6df6e80417b58abe377c90f5e3f7fe94cf7dfc55" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "d0dd7ce5a9d0be1f28086e818e52fdc5c78975df" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "5740b7382429d20b6ed0bbdb0694185af9507d44" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"smart-open.nvim": { "branch": "0.2.x", "commit": "7770b01ce4d551c143d7ec8589879320796621b9" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "cf482586c4f24e197375235a6e310b9b9e80ba83" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
|
||||
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
||||
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "1f8d414f61e0b05958c342df9b6a4c89ce268766" },
|
||||
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
|
||||
}
|
||||
|
||||
28
.config/nvim/lua/plug_init/conform_init.lua
Normal file
28
.config/nvim/lua/plug_init/conform_init.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
require("conform").setup({
|
||||
vim.api.nvim_create_autocmd({ "BufWritePre", "InsertLeave" }, {
|
||||
pattern = "*",
|
||||
callback = function(args)
|
||||
require("conform").format({ bufnr = args.buf })
|
||||
end,
|
||||
}),
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
rust = { "rustfmt", lsp_format = "fallback" },
|
||||
-- Conform will run multiple formatters sequentially
|
||||
python = { "ruff", "autopep8" },
|
||||
gdscript = { "gdtoolkit" },
|
||||
bash = { "shellharden" },
|
||||
javascript = { "prettier" },
|
||||
typescript = { "prettier" },
|
||||
markdown = { "prettier" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
json = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 700,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
log_level = vim.log.levels.DEBUG,
|
||||
})
|
||||
@@ -3,9 +3,7 @@ require("plug_init.lazy_path")
|
||||
require("lazy").setup("plugins")
|
||||
--require("onedarkpro").setup({
|
||||
-- filetypes = {
|
||||
-- all = true
|
||||
-- },
|
||||
-- options = {
|
||||
-- all = true }, options = {
|
||||
-- transparency = true
|
||||
-- }
|
||||
--})
|
||||
@@ -14,22 +12,26 @@ require("everforest").load()
|
||||
require("plug_init.which_key_init")
|
||||
require("plug_init.lualine_init")
|
||||
require("plug_init.aerial_init")
|
||||
require("plug_init.crates_init")
|
||||
require("plug_init.wilder_init")
|
||||
require("plug_init.telescope_init")
|
||||
require("plug_init.nvim_possession_init")
|
||||
require("plug_init.treesitter_init")
|
||||
--require("plug_init.noice_init")
|
||||
require("plugins.lsp_config")
|
||||
require("plug_init.lsp_init")
|
||||
require("plug_init.smart-open_init")
|
||||
require("plug_init.gitsigns")
|
||||
require("colorizer").setup {
|
||||
'css',
|
||||
'scss',
|
||||
'javascript',
|
||||
html = {
|
||||
mode = 'foreground',
|
||||
}
|
||||
}
|
||||
require("plug_init.mini_init")
|
||||
require("plug_init.nvim_possession_init")
|
||||
require("plug_init.treesitter_init")
|
||||
require("plug_init.conform_init")
|
||||
require("plug_init.crates_init")
|
||||
require("plug_init.color-picker_init")
|
||||
require("plug_init.lsp_init")
|
||||
--require("plug_init.noice_init")
|
||||
require("plugins.lsp_config")
|
||||
require("plugins.coq_nvim")
|
||||
require("plugins.trouble")
|
||||
require("colorizer").setup({
|
||||
"css",
|
||||
"scss",
|
||||
"javascript",
|
||||
html = {
|
||||
mode = "foreground",
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,39 +1,28 @@
|
||||
local lsp_zero = require('lsp-zero')
|
||||
lsp_zero.extend_lspconfig()
|
||||
------------
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||
vim.keymap.set('n', "]d", vim.diagnostic.goto_next)
|
||||
vim.keymap.set('n', '<leader>le', vim.diagnostic.open_float)
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set('n', '<leader>rr', vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set('n', '<leader>K', vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
|
||||
vim.keymap.set('n', '<leader>i', function()
|
||||
vim.lsp.buf.format { async = true }
|
||||
end, opts)
|
||||
-- integrated by default now?
|
||||
-- vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||
-- vim.keymap.set('n', "]d", vim.diagnostic.goto_next)
|
||||
-- vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
--vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
--vim.keymap.set('n', '<leader>K', vim.lsp.buf.hover, opts)
|
||||
--
|
||||
--vim.keymap.set('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
|
||||
--vim.keymap.set('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
|
||||
|
||||
-- vim.keymap.set("n", "<leader>rr", vim.lsp.buf.rename, opts)
|
||||
-- vim.keymap.set("n", "<leader>le", vim.diagnostic.open_float)
|
||||
-- vim.keymap.set("n", "<leader>i", function()
|
||||
-- require("conform").format({ async = true })
|
||||
-- -- vim.lsp.buf.format { async = true } -- fallback if without conform
|
||||
-- end, opts)
|
||||
end,
|
||||
})
|
||||
|
||||
-----------------
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp_zero.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
|
||||
require('lspconfig').lua_ls.setup(lsp_zero.nvim_lua_ls())
|
||||
|
||||
require('lspconfig').rust_analyzer.setup{
|
||||
require("lspconfig").rust_analyzer.setup({
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
["rust-analyzer"] = {
|
||||
imports = {
|
||||
granularity = {
|
||||
group = "module",
|
||||
@@ -46,18 +35,30 @@ require('lspconfig').rust_analyzer.setup{
|
||||
},
|
||||
},
|
||||
procMacro = {
|
||||
enable = true
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup({
|
||||
-- Replace the language servers listed here
|
||||
-- with the ones you want to install
|
||||
ensure_installed = {'rust_analyzer', 'ruff', 'quick_lint_js',
|
||||
'html', 'cssls', 'lua_ls', 'vimls'},
|
||||
handlers = {
|
||||
lsp_zero.default_setup,
|
||||
},
|
||||
})
|
||||
require("mason").setup({})
|
||||
require("mason-lspconfig").setup({
|
||||
-- Replace the language servers listed here
|
||||
-- with the ones you want to install
|
||||
ensure_installed = { "rust_analyzer", "ruff", "quick_lint_js", "html", "cssls", "lua_ls", "vimls" },
|
||||
})
|
||||
|
||||
require("lint").linters_by_ft = {
|
||||
cpp = { "cpplint" },
|
||||
gdscript = { "gdtoolkit" },
|
||||
gitcommit = { "commitlint" },
|
||||
markdown = {},
|
||||
python = { "ruff" },
|
||||
}
|
||||
require("lint").config = function()
|
||||
local lint = require("lint")
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
@@ -11,10 +11,10 @@ require('lualine').setup {
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = false,
|
||||
globalstatus = false,
|
||||
globalstatus = true,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 2000,
|
||||
statusline = 200,
|
||||
tabline = 200,
|
||||
winbar = 20000,
|
||||
},
|
||||
symbols = {
|
||||
@@ -37,13 +37,25 @@ require('lualine').setup {
|
||||
-- cond = require("noice").api.status.search.has,
|
||||
-- color = { fg = "#ff9e64" },
|
||||
-- },
|
||||
'pwd',
|
||||
'filename',
|
||||
},
|
||||
lualine_x = {
|
||||
-- {
|
||||
-- require("noice").api.status.command.get,
|
||||
-- cond = require("noice").api.status.command.has,
|
||||
-- color = { fg = "#ff9e64" },
|
||||
-- },
|
||||
{
|
||||
require("noice").api.status.command.get,
|
||||
cond = require("noice").api.status.command.has,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
require("noice").api.statusline.mode.get,
|
||||
cond = require("noice").api.statusline.mode.has,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
require("noice").api.status.search.get,
|
||||
cond = require("noice").api.status.search.has,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
'filesize',
|
||||
'filetype',
|
||||
'require"lsp-status".status()'
|
||||
@@ -66,8 +78,8 @@ require('lualine').setup {
|
||||
'tabs',
|
||||
mode = 2,
|
||||
path = 1,
|
||||
max_length = 60,
|
||||
tab_max_length = 13,
|
||||
max_length = 320,
|
||||
tab_max_length = 40,
|
||||
use_mode_colors = true,
|
||||
},
|
||||
},
|
||||
|
||||
14
.config/nvim/lua/plug_init/mini_init.lua
Normal file
14
.config/nvim/lua/plug_init/mini_init.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
require("mini.surround").setup({}) --surround strings with objects in one go (parens etc.)
|
||||
require("mini.pairs").setup({}) --put down parens etc in pairs
|
||||
require("mini.ai").setup({}) --selection with textobjects, such as "indside quotes, parens etc"
|
||||
require("mini.bracketed").setup({}) -- move to textobjects with brackets
|
||||
require("mini.jump2d").setup({}) -- jump to any point with Enter+ 2 letters in 2d matrix
|
||||
require("mini.files").setup({}) -- floating file manager in vim editor style
|
||||
require("mini.comment").setup({}) -- block comments etc
|
||||
|
||||
-- sugar ↓↓↓↓↓↓
|
||||
require("mini.indentscope").setup({}) -- show indent scope
|
||||
|
||||
-- potentially interesting
|
||||
--require("mini.align").setup({}) -- split lines in multiple sections, align these to rules, look into it more
|
||||
--require("mini.git").setup({}) -- git shortcuts, but collisions with gitsigns
|
||||
@@ -1,15 +1,38 @@
|
||||
require("noice").setup({
|
||||
lsp = {
|
||||
{
|
||||
cmdline = {
|
||||
enabled = true, -- enables the Noice cmdline UI
|
||||
view = "cmdline", -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
|
||||
opts = {}, -- global options for the cmdline. See section on views
|
||||
---@type table<string, CmdlineFormat>
|
||||
format = {
|
||||
-- conceal: (default=true) This will hide the text in the cmdline that matches the pattern.
|
||||
-- view: (default is cmdline view)
|
||||
-- opts: any options passed to the view
|
||||
-- icon_hl_group: optional hl_group for the icon
|
||||
-- title: set to anything or empty string to hide
|
||||
cmdline = { pattern = "^:", icon = "", lang = "vim" },
|
||||
search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
|
||||
search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
|
||||
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
|
||||
lua = { pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" }, icon = "", lang = "lua" },
|
||||
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
|
||||
input = { view = "cmdline_input", icon = " " }, -- Used by input()
|
||||
-- lua = false, -- to disable a format, set to `false`
|
||||
},
|
||||
},
|
||||
},
|
||||
-- lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
-- override = {
|
||||
-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
-- ["vim.lsp.util.stylize_markdown"] = true,
|
||||
-- ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
||||
-- },
|
||||
},
|
||||
-- },
|
||||
-- you can enable a preset for easier configuration
|
||||
--presets = {
|
||||
-- --bottom_search = cmdline, -- use a classic bottom cmdline for search
|
||||
--bottom_search = cmdline, -- use a classic bottom cmdline for search
|
||||
--command_palette = true, -- position the cmdline and popupmenu together
|
||||
--long_message_to_split = true, -- long messages will be sent to a split
|
||||
--inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
|
||||
@@ -2,7 +2,7 @@ local wk = require("which-key")
|
||||
|
||||
require("telescope").load_extension("smart_open")
|
||||
require("smart-open").setup({
|
||||
lazy = true,
|
||||
lazy = false,
|
||||
wk.add({
|
||||
{ "<leader><leader>", "<cmd>Telescope smart_open<cr>", desc="Smart open" },
|
||||
})
|
||||
|
||||
@@ -3,8 +3,8 @@ vim.opt.showmatch = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = false
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.expandtab = true -- spaces not tabs
|
||||
vim.opt.softtabstop = -1 -- use shiftwidth value
|
||||
vim.opt.expandtab = false -- tabs not spaces
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.relativenumber = true
|
||||
@@ -18,9 +18,10 @@ vim.opt.mouse = ""
|
||||
vim.opt.termguicolors = true -- enable truecolor
|
||||
vim.opt.undofile = true
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.local/share/nvim/undodir"
|
||||
vim.opt.updatetime = 50
|
||||
vim.opt.updatetime = 30
|
||||
vim.opt.colorcolumn = "79"
|
||||
vim.opt.cmdheight = 0 -- remove the last interface line under statusline
|
||||
vim.opt.showmode = false -- stop noice from showing mode, lualine will show mode anyway
|
||||
---
|
||||
vim.g.netrw_preview = 1
|
||||
vim.g.netrw_liststyle = 3
|
||||
@@ -41,12 +42,12 @@ vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- replace highlighted area without adding to register
|
||||
vim.keymap.set("x", "<leader>p", "\"_dP")
|
||||
vim.keymap.set("x", "<leader>p", '"_dP')
|
||||
|
||||
-- copy to system clipboard
|
||||
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||
vim.keymap.set("v", "<leader>y", "\"+y")
|
||||
vim.keymap.set("n", "<leader>Y", "\"+Y")
|
||||
vim.keymap.set("n", "<leader>y", '"+y')
|
||||
vim.keymap.set("v", "<leader>y", '"+y')
|
||||
vim.keymap.set("n", "<leader>Y", '"+Y')
|
||||
|
||||
-- open side panel explorer
|
||||
vim.keymap.set("n", "<leader>e", ":Lexplore<CR>")
|
||||
--vim.keymap.set("n", "<leader>e", ":Lexplore<CR>") -- now via whichkey
|
||||
|
||||
@@ -18,6 +18,8 @@ wk.add({
|
||||
{ "<leader>cv", desc = "Show versions popup" },
|
||||
{ "<leader>cx", desc = "Expand plain crate to inline table" },
|
||||
|
||||
--{ "<leader>e", "<cmd>Lexplore<cr>", desc = "Files Sidebar" },
|
||||
{ "<leader>e", "<cmd>lua MiniFiles.open()<cr>", desc = "Files w/ Mini" },
|
||||
{ "<leader>f", group = "Telescope" },
|
||||
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Find Buffer" },
|
||||
{ "<leader>fd", "<cmd>Telescope lsp_document_symbols<cr>", desc = "Find LSP Symbols" },
|
||||
@@ -42,13 +44,19 @@ wk.add({
|
||||
{ "<leader>gsh", "<cmd>Gitsigns stage_hunk<cr>", desc = "Stage Hunk" },
|
||||
{ "<leader>gu", "<cmd>Gitsigns undo_stage_hunk<cr>", desc = "Undo Stage Hunk" },
|
||||
|
||||
{ "<leader>i", desc = "Auto format file with linter(?), also on F3" },
|
||||
{ "<leader>le", desc = "Open diagnostic float" },
|
||||
{
|
||||
"<leader>i",
|
||||
function()
|
||||
require("conform").format({ async = true })
|
||||
end,
|
||||
desc = "Auto format file with linter(?), also on F3",
|
||||
},
|
||||
{ "<leader>le", vim.diagnostic.open_float, desc = "Open diagnostic float" },
|
||||
{ "<leader>K", desc = "Show definition" },
|
||||
{ "<leader>n", "<cmd>nohl<cr>", desc = "Stop highlighting search results" },
|
||||
|
||||
{ "<leader>r", group = "Rename" },
|
||||
{ "<leader>rr", desc = "Rename Variable" },
|
||||
{ "<leader>rr", vim.lsp.buf.rename, opts, desc = "Rename Variable" },
|
||||
|
||||
{ "<leader>s", group = "Sessions" },
|
||||
{ "<leader>sd", desc = "Delete Session" },
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
'saecki/crates.nvim',
|
||||
event = { "BufRead Cargo.toml" },
|
||||
lazy = true,
|
||||
verylazy = true,
|
||||
config = function()
|
||||
require('crates').setup()
|
||||
end,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
return {
|
||||
-- LSP Support
|
||||
{
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = "v3.x",
|
||||
lazy = true,
|
||||
config = false,
|
||||
},
|
||||
-- {
|
||||
-- 'VonHeikemen/lsp-zero.nvim',
|
||||
-- branch = "v3.x",
|
||||
-- lazy = true,
|
||||
-- config = false,
|
||||
-- },
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
{"hrsh7th/cmp-nvim-lsp"},
|
||||
},
|
||||
-- dependencies = {
|
||||
-- {"hrsh7th/cmp-nvim-lsp"},
|
||||
-- },
|
||||
lazy = true,
|
||||
},
|
||||
{
|
||||
@@ -21,12 +21,21 @@ return {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
lazy = true,
|
||||
},
|
||||
-- Autocompletion
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
{"L3MON4D3/LuaSnip"}
|
||||
"mfussenegger/nvim-lint",
|
||||
lazy = false,
|
||||
},
|
||||
lazy = true,
|
||||
-- supposedly faster formatter
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {},
|
||||
},
|
||||
-- Autocompletion
|
||||
-- {
|
||||
-- "hrsh7th/nvim-cmp",
|
||||
-- dependencies = {
|
||||
-- {"L3MON4D3/LuaSnip"}
|
||||
-- },
|
||||
-- lazy = true,
|
||||
-- },
|
||||
}
|
||||
|
||||
@@ -6,29 +6,37 @@ return {
|
||||
{ "ibhagwan/fzf-lua", lazy = true },
|
||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", lazy = true },
|
||||
{ "nvim-treesitter/nvim-treesitter-context", lazy = true },
|
||||
{ "nvim-telescope/telescope.nvim", tag = "0.1.2",
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
tag = "0.1.2",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
lazy = true,
|
||||
},
|
||||
{ "nvim-lualine/lualine.nvim",
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
lazy = false
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
lazy = false,
|
||||
},
|
||||
{ "stevearc/aerial.nvim" },
|
||||
-- {
|
||||
-- "folke/noice.nvim",
|
||||
-- event = "VeryLazy",
|
||||
-- opts = {},
|
||||
-- dependencies = {
|
||||
-- "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",
|
||||
-- }
|
||||
-- },
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
dependencies = {
|
||||
"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",
|
||||
},
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.nvim",
|
||||
version = false,
|
||||
},
|
||||
{
|
||||
"danielfalk/smart-open.nvim",
|
||||
branch = "0.2.x",
|
||||
@@ -42,12 +50,9 @@ return {
|
||||
},
|
||||
},
|
||||
{ "gelguy/wilder.nvim", lazy = true },
|
||||
{ "tpope/vim-fugitive", lazy = true },
|
||||
{ "norcalli/nvim-colorizer.lua", verylazy = true },
|
||||
{ "ziontee113/color-picker.nvim", verylazy = true },
|
||||
{ "lewis6991/gitsigns.nvim", verylazy = true },
|
||||
{ "MunifTanjim/nui.nvim", verylazy = true }, --dependency for telescope
|
||||
--{ "elkowar/yuck.vim", verylazy = true },--helper for eww widget configuration
|
||||
-- optional
|
||||
{ "nvim-treesitter/nvim-treesitter-textobjects", lazy = true },
|
||||
}
|
||||
|
||||
37
.config/nvim/lua/plugins/trouble.lua
Normal file
37
.config/nvim/lua/plugins/trouble.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
opts = {},
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle<cr>",
|
||||
desc = "Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xX",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
desc = "Buffer Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cs",
|
||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||
desc = "Symbols (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cl",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||
desc = "LSP Definitions / references / ... (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xL",
|
||||
"<cmd>Trouble loclist toggle<cr>",
|
||||
desc = "Location List (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xQ",
|
||||
"<cmd>Trouble qflist toggle<cr>",
|
||||
desc = "Quickfix List (Trouble)",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -3,7 +3,7 @@ return {
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 100
|
||||
vim.o.timeoutlen = 50
|
||||
end,
|
||||
opts = {}
|
||||
opts = {},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user