Cleanup
This commit is contained in:
@@ -1,58 +0,0 @@
|
||||
{
|
||||
"workspace.library": [
|
||||
"/Users/ghost/.local/share/nvim/lazy/neodev.nvim/types/stable",
|
||||
"/Users/ghost/Documents/DEV/IDE/nvim-macos/share/nvim/runtime/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/glow.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/vim-illuminate/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/telescope.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/todo-comments.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/lsp_signature.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/indent-blankline.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/guess-indent.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/plenary.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/gitsigns.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/trouble.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/barbar.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-cmp/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-code-action-menu/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-lspconfig/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/cmp-nvim-lsp/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-ts-autotag/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-ts-context-commentstring/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/lazy.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/git-blame.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/tokyonight.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/cmp_luasnip/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/lualine.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/smart-splits.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/telescope-fzf-native.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/mason-lspconfig.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-treesitter/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/neo-tree.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/toggleterm.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/symbols-outline.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/mason.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-dap-ui/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/cmp-cmdline/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/cmp-path/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/cmp-buffer/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-web-devicons/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-dap/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/neodev.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/Comment.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/filetype.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/cmp-nvim-lua/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/vim-matchup/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-dap-go/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/bigfile.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/LuaSnip/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-colorizer.lua/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/diffview.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nvim-autopairs/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/nui.nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/alpha-nvim/lua",
|
||||
"/Users/ghost/.local/share/nvim/lazy/cosmic-ui/lua",
|
||||
"/Users/ghost/.config/nvim/lua",
|
||||
"${3rd}/luv/library"
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
local g = vim.g
|
||||
local keymap = vim.keymap
|
||||
|
||||
g.neovide_scale_factor = 1.0
|
||||
|
||||
local change_scale_factor = function(delta)
|
||||
g.neovide_scale_factor = g.neovide_scale_factor * delta
|
||||
end
|
||||
|
||||
keymap.set("n", "<C-=>", function()
|
||||
change_scale_factor(1.25)
|
||||
end)
|
||||
|
||||
keymap.set("n", "<C-->", function()
|
||||
change_scale_factor(1/1.25)
|
||||
end)
|
||||
@@ -1,6 +1,10 @@
|
||||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
event = "BufEnter",
|
||||
dependencies = {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
"nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
init = function() vim.g.barbar_auto_setup = false end,
|
||||
opts = {
|
||||
auto_hide = true,
|
||||
|
||||
@@ -1,42 +1,6 @@
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
opts = {
|
||||
char = "▏",
|
||||
context_char = "▏",
|
||||
filetype_exclude = {
|
||||
"help",
|
||||
"terminal",
|
||||
"alpha",
|
||||
"lazy",
|
||||
"neo-tree",
|
||||
"Trouble"
|
||||
},
|
||||
buftype_exclude = { "nofile", "terminal" },
|
||||
context_patterns = {
|
||||
"class",
|
||||
"return",
|
||||
"function",
|
||||
"method",
|
||||
"^if",
|
||||
"^while",
|
||||
"jsx_element",
|
||||
"^for",
|
||||
"^object",
|
||||
"^table",
|
||||
"block",
|
||||
"arguments",
|
||||
"if_statement",
|
||||
"else_clause",
|
||||
"jsx_element",
|
||||
"jsx_self_closing_element",
|
||||
"try_statement",
|
||||
"catch_clause",
|
||||
"import_statement",
|
||||
"operation_type"
|
||||
},
|
||||
show_trailing_blankline_indent = false,
|
||||
show_first_indent_level = false,
|
||||
use_treesitter = true,
|
||||
show_current_context = true
|
||||
}
|
||||
event = "BufEnter",
|
||||
main = "ibl",
|
||||
config = true
|
||||
}
|
||||
|
||||
@@ -1,54 +1,29 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-nvim-lua"
|
||||
},
|
||||
event = { "InsertEnter", "CmdlineEnter" },
|
||||
event = "InsertEnter",
|
||||
dependencies = "L3MON4D3/LuaSnip",
|
||||
config = function()
|
||||
local lsp_zero = require("lsp-zero")
|
||||
lsp_zero.extend_cmp()
|
||||
|
||||
local cmp = require("cmp")
|
||||
local cmp_action = lsp_zero.cmp_action()
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end
|
||||
cmp.setup({
|
||||
formatting = lsp_zero.cmp_format(),
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered()
|
||||
},
|
||||
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-f>"] = cmp_action.luasnip_jump_forward(),
|
||||
["<C-b>"] = cmp_action.luasnip_jump_backward(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping.select_next_item(),
|
||||
["<S-Tab>"] = cmp.mapping.select_prev_item()
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" }
|
||||
})
|
||||
}
|
||||
|
||||
cmp.setup.cmdline({ "/", "?" }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = { name = "buffer" }
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(":", {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "path" }
|
||||
}, {
|
||||
{ name = "cmdline" }
|
||||
})
|
||||
})
|
||||
end
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.setup {
|
||||
ignore_missing = true,
|
||||
key_labels = {
|
||||
["<space>"] = "SPC"
|
||||
}
|
||||
}
|
||||
|
||||
wk.register({
|
||||
["<leader>"] = {
|
||||
f = {
|
||||
name = "Find",
|
||||
f = { "<cmd>Telescope fd<CR>", "find file" },
|
||||
w = { "<cmd>Telescope live_grep<CR>", "live grep" },
|
||||
s = { "<cmd>Telescope spell_suggest<CR>", "spell suggest" },
|
||||
b = { "<cmd>Telescope buffers<CR>", "all buffers" },
|
||||
t = { "<cmd>TodoTelescope<CR>", "todos" },
|
||||
["."] = { "<cmd>Telescope keymaps<CR>", "keymaps" }
|
||||
},
|
||||
|
||||
l = {
|
||||
name = "LSP",
|
||||
r = { "<cmd>lua require('cosmic-ui').rename()<CR>", "rename" },
|
||||
d = { "<cmd>Telescope diagnostics<CR>", "diagnostics" },
|
||||
f = { "<cmd>lua vim.lsp.buf.format { async = true }<CR>", "format" },
|
||||
a = { "<cmd>CodeActionMenu<CR>", "code action" }
|
||||
},
|
||||
|
||||
b = {
|
||||
name = "Buffer",
|
||||
p = { "<cmd>BufferPick<CR>", "pick buffer" },
|
||||
q = { "<cmd>BufferMovePrevious<CR>", "move buffer left" },
|
||||
w = { "<cmd>BufferMoveNext<CR>", "move buffer right" },
|
||||
x = { "<cmd>BufferCloseAllButCurrent<CR>", "close all but current" }
|
||||
},
|
||||
|
||||
g = {
|
||||
name = "Git",
|
||||
b = { "<cmd>Gitsigns blame_line<CR>", "blame line" },
|
||||
B = { "<cmd>DiffviewOpen<CR>", "diff view & merge tool" },
|
||||
d = { "<cmd>Gitsigns diffthis<CR>", "diff" },
|
||||
s = { "<cmd>Telescope git_status<CR>", "git status" },
|
||||
c = { "<cmd>Telescope git_commits<CR>", "commits" },
|
||||
C = { "<cmd>DiffviewClose<CR>", "close diffview & merge tool" }
|
||||
},
|
||||
|
||||
x = { "<cmd>BufferClose<CR>", "close buffer" },
|
||||
c = { "<cmd>Telescope colorscheme<CR>", "colorscheme" },
|
||||
s = { "<cmd>SymbolsOutline<CR>", "symbols outline" },
|
||||
h = { "<cmd>noh<CR>", "no highlight" },
|
||||
k = { "<cmd>lua vim.lsp.buf.hover()<CR>", "hover" }
|
||||
},
|
||||
|
||||
t = {
|
||||
name = "Trouble",
|
||||
t = { "<cmd>TroubleToggle<CR>", "toggle trouble" }
|
||||
},
|
||||
|
||||
g = {
|
||||
d = { "<cmd>lua vim.lsp.buf.definition()<CR>", "definition" },
|
||||
D = { "<cmd>lua vim.lsp.buf.declaration()<CR>", "declaration" },
|
||||
i = { "<cmd>lua vim.lsp.buf.implementation()<CR>", "implementation" },
|
||||
t = { "<cmd>lua vim.lsp.buf.type_definition()<CR>", "type definition" }
|
||||
},
|
||||
|
||||
K = { "<cmd>lua require('lsp_signature').toggle_float_win()<CR>", "hover" },
|
||||
|
||||
-- Nvim Tree
|
||||
["<C-n>"] = { "<cmd>Neotree toggle<CR>", "toggle neotree" },
|
||||
|
||||
-- Switching Buffers
|
||||
["<TAB>"] = { "<cmd>BufferNext<CR>", "next buffer" },
|
||||
["<S-TAB>"] = { "<cmd>BufferPrevious<CR>", "previous buffer" },
|
||||
|
||||
-- Find in file
|
||||
["<C-f>"] = { "<cmd>Telescope current_buffer_fuzzy_find<CR>", "find in file" }
|
||||
})
|
||||
@@ -1,25 +1,31 @@
|
||||
return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"LunarVim/bigfile.nvim",
|
||||
"f-person/git-blame.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"wakatime/vim-wakatime",
|
||||
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
"nvim-pack/nvim-spectre",
|
||||
dependencies = "nvim-lua/plenary.nvim"
|
||||
},
|
||||
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "BufRead",
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
config = function()
|
||||
require("alpha").setup(require("alpha.themes.dashboard").config)
|
||||
end
|
||||
"nmac427/guess-indent.nvim",
|
||||
lazy = false,
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"andymass/vim-matchup",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter"
|
||||
event = "CursorMoved",
|
||||
config = function()
|
||||
vim.g.matchup_matchparen_offscreen = { method = "popup" }
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
@@ -28,19 +34,12 @@ return {
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"nmac427/guess-indent.nvim",
|
||||
config = true
|
||||
},
|
||||
-- NOTE: Git
|
||||
"f-person/git-blame.nvim",
|
||||
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "BufEnter",
|
||||
config = true
|
||||
},
|
||||
|
||||
@@ -52,58 +51,30 @@ return {
|
||||
},
|
||||
|
||||
-- NOTE: LSP
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
branch = "v3.x",
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
{ "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } },
|
||||
"williamboman/mason-lspconfig.nvim"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
dependencies = "williamboman/mason.nvim",
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local handlers = {
|
||||
function (server_name)
|
||||
require("lspconfig")[server_name].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
require("mason-lspconfig").setup { handlers = handlers }
|
||||
config = false,
|
||||
init = function()
|
||||
local g = vim.g
|
||||
g.lsp_zero_extend_cmp = 0
|
||||
g.lsp_zero_extend_lspconfig = 0
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
build = ":MasonUpdate",
|
||||
lazy = false,
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true
|
||||
},
|
||||
|
||||
"RRethy/vim-illuminate",
|
||||
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
@@ -124,42 +95,21 @@ return {
|
||||
},
|
||||
|
||||
{
|
||||
"weilbith/nvim-code-action-menu",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
cmd = "CodeActionMenu"
|
||||
},
|
||||
|
||||
{
|
||||
"CosmicNvim/cosmic-ui",
|
||||
lazy = true,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
"numToStr/Comment.nvim",
|
||||
lazy = false,
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
lazy = true,
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = true
|
||||
"rmagatti/goto-preview",
|
||||
opts = {
|
||||
default_mappings = true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"leoluz/nvim-dap-go",
|
||||
lazy = true,
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
require("plugins.config.whichkey")
|
||||
end
|
||||
},
|
||||
"RRethy/vim-illuminate",
|
||||
|
||||
-- NOTE: Flutter
|
||||
{
|
||||
"akinsho/flutter-tools.nvim",
|
||||
lazy = false,
|
||||
|
||||
27
lua/plugins/lsp.lua
Normal file
27
lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
cmd = { "LspInfo", "LspInstall", "LspStart" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
},
|
||||
config = function()
|
||||
local lsp_zero = require("lsp-zero")
|
||||
lsp_zero.extend_lspconfig()
|
||||
|
||||
lsp_zero.on_attach(function(_, bufnr)
|
||||
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||
end)
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
handlers = {
|
||||
lsp_zero.default_setup,
|
||||
lua_ls = function()
|
||||
local lua_opts = lsp_zero.nvim_lua_ls()
|
||||
require("lspconfig").lua_ls.setup(lua_opts)
|
||||
end,
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -1,19 +1,21 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "BufEnter",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
opts = {
|
||||
options = {
|
||||
theme = "tokyonight"
|
||||
},
|
||||
|
||||
extensions = {
|
||||
"fzf",
|
||||
"lazy",
|
||||
"neo-tree",
|
||||
"nvim-dap-ui",
|
||||
"quickfix",
|
||||
"symbols-outline",
|
||||
"toggleterm",
|
||||
"trouble"
|
||||
"trouble",
|
||||
"mason"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
@@ -7,70 +8,17 @@ return {
|
||||
},
|
||||
cmd = "Neotree",
|
||||
init = function()
|
||||
vim.g.neo_tree_remove_legacy_commands = true
|
||||
vim.fn.sign_define("DiagnosticSignError",
|
||||
{ text = " ", texthl = "DiagnosticSignError" })
|
||||
vim.fn.sign_define("DiagnosticSignWarn",
|
||||
{ text = " ", texthl = "DiagnosticSignWarn" })
|
||||
vim.fn.sign_define("DiagnosticSignInfo",
|
||||
{ text = " ", texthl = "DiagnosticSignInfo" })
|
||||
vim.fn.sign_define("DiagnosticSignHint",
|
||||
{ text = "", texthl = "DiagnosticSignHint" })
|
||||
vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticSignError" })
|
||||
vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" })
|
||||
vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" })
|
||||
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
||||
end,
|
||||
opts = {
|
||||
close_if_last_window = true,
|
||||
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
content_layout = "center",
|
||||
sources = {
|
||||
{ source = "filesystem", display_name = " Files" },
|
||||
{ source = "buffers", display_name = " Buffers" },
|
||||
{ source = "git_status", display_name = " Git" }
|
||||
}
|
||||
},
|
||||
|
||||
group_empty_dirs = true,
|
||||
window = { width = 30 },
|
||||
|
||||
window = { width = "30" },
|
||||
filesystem = {
|
||||
follow_current_file = true,
|
||||
hijack_netrw_behavior = "open_current",
|
||||
use_libuv_file_watcher = true
|
||||
},
|
||||
|
||||
default_component_configs = {
|
||||
icon = {
|
||||
folder_empty = "",
|
||||
folder_empty_open = ""
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
renamed = "",
|
||||
unstaged = ""
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
document_symbols = {
|
||||
kinds = {
|
||||
File = { icon = "", hl = "Tag" },
|
||||
Namespace = { icon = "", hl = "Include" },
|
||||
Package = { icon = "", hl = "Label" },
|
||||
Class = { icon = "", hl = "Include" },
|
||||
Property = { icon = "", hl = "@property" },
|
||||
Enum = { icon = "", hl = "@number" },
|
||||
Function = { icon = "", hl = "Function" },
|
||||
String = { icon = "", hl = "String" },
|
||||
Number = { icon = "", hl = "Number" },
|
||||
Array = { icon = "", hl = "Type" },
|
||||
Object = { icon = "", hl = "Type" },
|
||||
Key = { icon = "", hl = "" },
|
||||
Struct = { icon = "", hl = "Type" },
|
||||
Operator = { icon = "", hl = "Operator" },
|
||||
TypeParameter = { icon = "", hl = "Type" },
|
||||
StaticMethod = { icon = ' ', hl = 'Function' }
|
||||
}
|
||||
follow_current_file = { enabled = true },
|
||||
group_empty_dirs = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
return {
|
||||
"mrjones2014/smart-splits.nvim",
|
||||
build = "./kitty/install-kittens.bash",
|
||||
opt = {
|
||||
ignored_buftypes = { "NeoTree" }
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,18 @@
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
enabled = vim.fn.executable "make" == 1,
|
||||
build = "make"
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }
|
||||
},
|
||||
cmd = "Telescope",
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.setup {
|
||||
defaults = {
|
||||
layout_strategy = "vertical"
|
||||
},
|
||||
|
||||
file_ignore_patterns = { "node_modules" }
|
||||
layout_strategy = "vertical",
|
||||
file_ignore_patterns = { "node_modules" }
|
||||
}
|
||||
}
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
return {
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
style = "night",
|
||||
styles = {
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"windwp/nvim-ts-autotag",
|
||||
"JoosepAlviste/nvim-ts-context-commentstring"
|
||||
{ "windwp/nvim-ts-autotag", config = true }
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup {
|
||||
ensure_installed = { "lua" },
|
||||
highlight = { enable = true },
|
||||
incremental_selection = { enable = true },
|
||||
|
||||
indent = {
|
||||
enable = true,
|
||||
disable = { 'dart' }
|
||||
disable = { "dart" }
|
||||
},
|
||||
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
matchup = { enable = true }
|
||||
}
|
||||
end
|
||||
|
||||
83
lua/plugins/whichkey.lua
Normal file
83
lua/plugins/whichkey.lua
Normal file
@@ -0,0 +1,83 @@
|
||||
local function config()
|
||||
local wk = require("which-key")
|
||||
|
||||
wk.register({
|
||||
["<leader>"] = {
|
||||
-- Finders
|
||||
f = {
|
||||
name = "Finders",
|
||||
f = { "<cmd>Telescope fd<CR>", "Find files" },
|
||||
w = { "<cmd>Telescope live_grep<CR>", "Text grep" },
|
||||
s = { "<cmd>Telescope spell_suggest<CR>", "Spell suggest" },
|
||||
t = { "<cmd>TodoTelescope<CR>", "Todos" },
|
||||
["."] = { "<cmd>Telescope keymaps<CR>", "Keymaps" }
|
||||
},
|
||||
|
||||
-- Buffers
|
||||
b = {
|
||||
name = "Buffers",
|
||||
p = { "<cmd>BufferPick<CR>", "Pick buffer" },
|
||||
q = { "<cmd>BufferMovePrevious<CR>", "Move buffer left" },
|
||||
w = { "<cmd>BufferMoveNext<CR>", "Move buffer right" },
|
||||
x = { "<cmd>BufferCloseAllButCurrent<CR>", "Close all but current" }
|
||||
},
|
||||
|
||||
-- Git
|
||||
g = {
|
||||
name = "Git",
|
||||
b = { "<cmd>Gitsigns blame_line<CR>", "Blame line" },
|
||||
d = { "<cmd>Gitsigns diffthis<CR>", "Diff" },
|
||||
D = { "<cmd>DiffviewOpen<CR>", "Diff view & merge tool" },
|
||||
C = { "<cmd>DiffviewClose<CR>", "Close diffview & merge tool" }
|
||||
},
|
||||
|
||||
-- LSP
|
||||
l = {
|
||||
name = "LSP",
|
||||
f = { "<cmd>lua vim.lsp.buf.format { async = true }<CR>", "Format" },
|
||||
a = { "<cmd>lua vim.lsp.buf.code_action()<CR>", "Code Action" }
|
||||
},
|
||||
|
||||
-- Misc
|
||||
c = { "<cmd>BufferClose<CR>", "Close buffer" },
|
||||
h = { "<cmd>noh<CR>", "No highlight" },
|
||||
s = { "<cmd>SymbolsOutline<CR>", "Symbols outline" },
|
||||
t = { "<cmd>TroubleToggle<CR>", "Toggle trouble" }
|
||||
},
|
||||
|
||||
g = {
|
||||
d = { "<cmd>lua vim.lsp.buf.definition()<CR>", "definition" },
|
||||
t = { "<cmd>lua vim.lsp.buf.type_definition()<CR>", "type definition" }
|
||||
},
|
||||
|
||||
-- Neotree
|
||||
["<C-n>"] = { "<cmd>Neotree toggle<CR>", "Toggle neotree" },
|
||||
|
||||
-- Switching Buffers
|
||||
["<TAB>"] = { "<cmd>BufferNext<CR>", "Next buffer" },
|
||||
["<S-TAB>"] = { "<cmd>BufferPrevious<CR>", "Previous buffer" },
|
||||
|
||||
-- Find in file
|
||||
["<C-f>"] = { "<cmd>Telescope current_buffer_fuzzy_find<CR>", "Find in file" },
|
||||
|
||||
-- Text replacer in file
|
||||
["<C-r>"] = { "<cmd>lua require('spectre').toggle()<CR>", "Replace in file" }
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
local o = vim.o
|
||||
o.timeout = true
|
||||
o.timeoutlen = 300
|
||||
end,
|
||||
config = config,
|
||||
opts = {
|
||||
ignore_missing = false,
|
||||
key_labels = {
|
||||
["<space>"] = "SPC"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user