update to neovim
This commit is contained in:
@@ -1,20 +1,9 @@
|
|||||||
{
|
{
|
||||||
"extras": [
|
"extras": [
|
||||||
"lazyvim.plugins.extras.dap.core",
|
|
||||||
"lazyvim.plugins.extras.lang.clangd",
|
|
||||||
"lazyvim.plugins.extras.lang.cmake",
|
|
||||||
"lazyvim.plugins.extras.lang.docker",
|
|
||||||
"lazyvim.plugins.extras.lang.json",
|
|
||||||
"lazyvim.plugins.extras.lang.markdown",
|
|
||||||
"lazyvim.plugins.extras.lang.omnisharp",
|
|
||||||
"lazyvim.plugins.extras.lang.python",
|
|
||||||
"lazyvim.plugins.extras.lang.rust",
|
|
||||||
"lazyvim.plugins.extras.lang.tex",
|
|
||||||
"lazyvim.plugins.extras.lang.typescript",
|
|
||||||
"lazyvim.plugins.extras.lang.yaml"
|
|
||||||
],
|
],
|
||||||
"news": {
|
"news": {
|
||||||
"NEWS.md": "2123"
|
"NEWS.md": "2850"
|
||||||
},
|
},
|
||||||
"version": 2
|
"version": 3
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@ require("lazy").setup({
|
|||||||
version = false, -- always use the latest git commit
|
version = false, -- always use the latest git commit
|
||||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||||
},
|
},
|
||||||
install = { colorscheme = { "tokyonight" } },
|
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||||
checker = { enabled = true }, -- automatically check for plugin updates
|
checker = { enabled = true }, -- automatically check for plugin updates
|
||||||
performance = {
|
performance = {
|
||||||
rtp = {
|
rtp = {
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
-- Options are automatically loaded before lazy.nvim startup
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
vim.g.autoformat = false
|
|
||||||
|
LazyVim.terminal.setup("fish")
|
||||||
|
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
|
|
||||||
opt.smartindent = true
|
opt.mouse = ""
|
||||||
opt.relativenumber = true
|
|
||||||
opt.clipboard = "unnamedplus"
|
|
||||||
opt.shell = "fish"
|
|
||||||
opt.spell = false
|
|
||||||
|
|||||||
@@ -30,14 +30,6 @@ return {
|
|||||||
-- disable trouble
|
-- disable trouble
|
||||||
{ "folke/trouble.nvim", enabled = false },
|
{ "folke/trouble.nvim", enabled = false },
|
||||||
|
|
||||||
-- add symbols-outline
|
|
||||||
{
|
|
||||||
"simrat39/symbols-outline.nvim",
|
|
||||||
cmd = "SymbolsOutline",
|
|
||||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
|
||||||
config = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- override nvim-cmp and add cmp-emoji
|
-- override nvim-cmp and add cmp-emoji
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
@@ -71,18 +63,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- add telescope-fzf-native
|
|
||||||
{
|
|
||||||
"telescope.nvim",
|
|
||||||
dependencies = {
|
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
|
||||||
build = "make",
|
|
||||||
config = function()
|
|
||||||
require("telescope").load_extension("fzf")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- add pyright to lspconfig
|
-- add pyright to lspconfig
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
@@ -102,7 +82,7 @@ return {
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
"jose-elias-alvarez/typescript.nvim",
|
"jose-elias-alvarez/typescript.nvim",
|
||||||
init = function()
|
init = function()
|
||||||
require("lazyvim.util").on_attach(function(_, buffer)
|
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||||
@@ -141,7 +121,6 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"bash",
|
"bash",
|
||||||
"c_sharp",
|
|
||||||
"html",
|
"html",
|
||||||
"javascript",
|
"javascript",
|
||||||
"json",
|
"json",
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
return {
|
|
||||||
{
|
|
||||||
"LazyVim/LazyVim",
|
|
||||||
opts = {
|
|
||||||
colorscheme = "tokyonight",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,27 +1,110 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v3.x",
|
branch = "v3.x",
|
||||||
|
cmd = "Neotree",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>fe",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() })
|
||||||
|
end,
|
||||||
|
desc = "Explorer NeoTree (Root Dir)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fE",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() })
|
||||||
|
end,
|
||||||
|
desc = "Explorer NeoTree (cwd)",
|
||||||
|
},
|
||||||
|
{ "<leader>e", "<leader>fe", desc = "Explorer NeoTree (Root Dir)", remap = true },
|
||||||
|
{ "<leader>E", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
|
||||||
|
{
|
||||||
|
"<leader>ge",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ source = "git_status", toggle = true })
|
||||||
|
end,
|
||||||
|
desc = "Git Explorer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>be",
|
||||||
|
function()
|
||||||
|
require("neo-tree.command").execute({ source = "buffers", toggle = true })
|
||||||
|
end,
|
||||||
|
desc = "Buffer Explorer",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
deactivate = function()
|
||||||
|
vim.cmd([[Neotree close]])
|
||||||
|
end,
|
||||||
|
init = function()
|
||||||
|
if vim.fn.argc(-1) == 1 then
|
||||||
|
local stat = vim.uv.fs_stat(vim.fn.argv(0))
|
||||||
|
if stat and stat.type == "directory" then
|
||||||
|
require("neo-tree")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
|
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
|
||||||
|
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
||||||
filesystem = {
|
filesystem = {
|
||||||
bind_to_cwd = true,
|
bind_to_cwd = false,
|
||||||
|
follow_current_file = { enabled = true },
|
||||||
|
use_libuv_file_watcher = true,
|
||||||
filtered_items = {
|
filtered_items = {
|
||||||
visible = true,
|
visible = true,
|
||||||
hide_dotfiles = false,
|
hide_dotfiles = true,
|
||||||
hide_gitignored = false,
|
hide_gitignored = true,
|
||||||
-- For windows
|
|
||||||
hide_hidden = false,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
close_if_last_window = false,
|
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
["P"] = { "toggle_preview", config = { use_float = false, use_image_nvim = true } },
|
["<space>"] = "none",
|
||||||
|
["Y"] = {
|
||||||
|
function(state)
|
||||||
|
local node = state.tree:get_node()
|
||||||
|
local path = node:get_id()
|
||||||
|
vim.fn.setreg("+", path, "c")
|
||||||
|
end,
|
||||||
|
desc = "Copy Path to Clipboard",
|
||||||
|
},
|
||||||
|
["O"] = {
|
||||||
|
function(state)
|
||||||
|
require("lazy.util").open(state.tree:get_node().path, { system = true })
|
||||||
|
end,
|
||||||
|
desc = "Open with System Application",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default_component_configs = {
|
||||||
|
indent = {
|
||||||
|
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||||
|
expander_collapsed = "",
|
||||||
|
expander_expanded = "",
|
||||||
|
expander_highlight = "NeoTreeExpander",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dependencies = {
|
config = function(_, opts)
|
||||||
"nvim-lua/plenary.nvim",
|
local function on_move(data)
|
||||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
LazyVim.lsp.on_rename(data.source, data.destination)
|
||||||
"MunifTanjim/nui.nvim",
|
end
|
||||||
},
|
|
||||||
|
local events = require("neo-tree.events")
|
||||||
|
opts.event_handlers = opts.event_handlers or {}
|
||||||
|
vim.list_extend(opts.event_handlers, {
|
||||||
|
{ event = events.FILE_MOVED, handler = on_move },
|
||||||
|
{ event = events.FILE_RENAMED, handler = on_move },
|
||||||
|
})
|
||||||
|
require("neo-tree").setup(opts)
|
||||||
|
vim.api.nvim_create_autocmd("TermClose", {
|
||||||
|
pattern = "*lazygit",
|
||||||
|
callback = function()
|
||||||
|
if package.loaded["neo-tree.sources.git_status"] then
|
||||||
|
require("neo-tree.sources.git_status").refresh()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,28 @@
|
|||||||
return {
|
return {
|
||||||
{
|
"nvim-treesitter/nvim-treesitter",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
opts = {
|
||||||
opts = {
|
ensure_installed = {
|
||||||
ensure_installed = {
|
"bash",
|
||||||
"bash",
|
"html",
|
||||||
"c_sharp",
|
"javascript",
|
||||||
"css",
|
"json",
|
||||||
"scss",
|
"lua",
|
||||||
"dockerfile",
|
"markdown",
|
||||||
"html",
|
"markdown_inline",
|
||||||
"javascript",
|
"python",
|
||||||
"json",
|
"query",
|
||||||
"lua",
|
"regex",
|
||||||
"markdown",
|
"tsx",
|
||||||
"markdown_inline",
|
"typescript",
|
||||||
"sql",
|
"vim",
|
||||||
"python",
|
"yaml",
|
||||||
"query",
|
"fish",
|
||||||
"regex",
|
"sql",
|
||||||
"tsx",
|
"properties",
|
||||||
"typescript",
|
"rust",
|
||||||
"vim",
|
"vue",
|
||||||
"yaml",
|
"xml",
|
||||||
"xml",
|
"csv",
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user