Updated config
This commit is contained in:
@ -1,101 +0,0 @@
|
||||
local icons = {
|
||||
Namespace = "",
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
Table = "",
|
||||
Object = "",
|
||||
Tag = "",
|
||||
Array = "[]",
|
||||
Boolean = "",
|
||||
Number = "",
|
||||
Null = "",
|
||||
String = "",
|
||||
Calendar = "",
|
||||
Watch = "",
|
||||
Package = "",
|
||||
Copilot = "",
|
||||
Codeium = "",
|
||||
TabNine = "",
|
||||
}
|
||||
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
-- "hrsh7th/cmp-buffer",
|
||||
-- "hrsh7th/cmp-path",
|
||||
-- "L3MON4D3/LuaSnip",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
local opts = {
|
||||
completion = {
|
||||
-- autocomplete = false,
|
||||
completeopt = "menu,menuone,noinsert",
|
||||
},
|
||||
formatting = {
|
||||
fields = { "abbr", "kind", "menu" },
|
||||
format = function(_, item)
|
||||
local icon = icons[item.kind] or ""
|
||||
item.kind = string.format(" %s %s", icon, item.kind)
|
||||
return item
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<C-space>"] = cmp.mapping.complete(),
|
||||
["<C-up>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-down>"] = cmp.mapping.select_next_item(),
|
||||
["<C-x>"] = cmp.mapping.abort(),
|
||||
["<cr>"] = cmp.mapping.confirm({ select = true }),
|
||||
},
|
||||
-- snippet = {
|
||||
-- expand = function(args)
|
||||
-- require("luasnip").lsp_expand(args.body)
|
||||
-- end,
|
||||
-- },
|
||||
-- preselect = cmp.PreselectMode.None,
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
-- { name = "luasnip" },
|
||||
-- { name = "buffer" },
|
||||
-- { name = "path" },
|
||||
},
|
||||
window = {
|
||||
completion = {
|
||||
border = "rounded",
|
||||
scrollbar = false,
|
||||
},
|
||||
documentation = {
|
||||
border = "rounded",
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
cmp.setup(opts)
|
||||
end,
|
||||
}
|
@ -1,8 +1,17 @@
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
keys = {
|
||||
{"<C-_>", "<cmd>lua require('Comment.api').toggle.linewise.current()<cr>", desc = "Toggle comment"},
|
||||
{"<C-_>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", mode = "v", desc = "Toggle comment"},
|
||||
{
|
||||
"<C-/>",
|
||||
"<cmd>lua require('Comment.api').toggle.linewise.current()<cr>",
|
||||
desc = "Toggle comment",
|
||||
},
|
||||
{
|
||||
"<C-/>",
|
||||
"<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
|
||||
mode = "v",
|
||||
desc = "Toggle comment",
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
opts = {
|
||||
|
8
.config/nvim/lua/plugins/mini-complete.lua
Normal file
8
.config/nvim/lua/plugins/mini-complete.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
"echasnovski/mini.completion",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
set_vim_settings = false,
|
||||
},
|
||||
config = true,
|
||||
}
|
14
.config/nvim/lua/plugins/multi-cursor.lua
Normal file
14
.config/nvim/lua/plugins/multi-cursor.lua
Normal file
@ -0,0 +1,14 @@
|
||||
return {
|
||||
"brenton-leighton/multiple-cursors.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{"<C-Down>", "<Cmd>MultipleCursorsAddDown<CR>", mode = {"n", "i"}},
|
||||
{"<C-j>", "<Cmd>MultipleCursorsAddDown<CR>"},
|
||||
{"<C-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = {"n", "i"}},
|
||||
{"<C-k>", "<Cmd>MultipleCursorsAddUp<CR>"},
|
||||
{"<C-LeftMouse>", "<Cmd>MultipleCursorsMouseAddDelete<CR>", mode = {"n", "i"}},
|
||||
{"<Leader>a", "<Cmd>MultipleCursorsAddBySearch<CR>", mode = {"n", "x"}},
|
||||
{"<Leader>A", "<Cmd>MultipleCursorsAddBySearchV<CR>", mode = {"n", "x"}},
|
||||
},
|
||||
config = true,
|
||||
}
|
@ -4,7 +4,7 @@ return {
|
||||
priority = 1000,
|
||||
opts = {
|
||||
style = "dark",
|
||||
transparent = true,
|
||||
--transparent = true,
|
||||
term_colors = true,
|
||||
highlights = {
|
||||
["StatusLine"] = {fg = "$bg3", bg = "Normal"},
|
||||
|
@ -12,6 +12,14 @@ return {
|
||||
},
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = require("telescope.actions").close,
|
||||
},
|
||||
},
|
||||
winblend = 10,
|
||||
},
|
||||
extensions = {
|
||||
project = {
|
||||
base_dirs = {
|
||||
|
@ -1,3 +1,34 @@
|
||||
local function on_attach(bufnr)
|
||||
local api = require("nvim-tree.api")
|
||||
|
||||
-- default mappings
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
-- navigation
|
||||
vim.keymap.set("n", "<C-Up>", api.tree.change_root_to_parent, opts("Up"))
|
||||
vim.keymap.set("n", "<C-Enter>", api.tree.change_root_to_node, opts("Enter"))
|
||||
|
||||
-- open folders with a single click
|
||||
vim.keymap.set("n", "<LeftRelease>", function()
|
||||
vim.defer_fn(function ()
|
||||
local win = vim.api.nvim_get_current_win()
|
||||
local view = require("nvim-tree.view")
|
||||
if view.get_winnr() ~= win then return end
|
||||
|
||||
api.node.open.edit()
|
||||
api.tree.focus()
|
||||
-- local node = api.tree.get_node_under_cursor()
|
||||
-- if node.nodes ~= nil then
|
||||
-- api.node.open.edit()
|
||||
-- end
|
||||
end, 10)
|
||||
end, opts("Open folder/file"))
|
||||
end
|
||||
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
event = "VeryLazy",
|
||||
@ -14,6 +45,7 @@ return {
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
},
|
||||
on_attach = on_attach,
|
||||
renderer = {
|
||||
root_folder_label = false,
|
||||
highlight_git = true,
|
||||
|
Reference in New Issue
Block a user