yes
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
lldb
|
||||
lazygit
|
||||
gcc
|
||||
gopls
|
||||
# gopls
|
||||
stylua
|
||||
rustfmt
|
||||
# rustfmt
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
@@ -33,7 +33,7 @@ programs.neovim.plugins = [
|
||||
".config/nvim/lua/plugins/blink-cmp.lua".source = ./lua/plugins/blink-cmp.lua;
|
||||
".config/nvim/lua/plugins/lsp.lua".source = ./lua/plugins/lsp.lua;
|
||||
# ".config/nvim/lua/plugins/mason.lua".source = ./lua/plugins/mason.lua;
|
||||
".config/nvim/lua/plugins/treesitter.lua".source = ./lua/plugins/treesitter.lua;
|
||||
# ".config/nvim/lua/plugins/treesitter.lua".source = ./lua/plugins/treesitter.lua;
|
||||
".config/nvim/lua/plugins/catppuccin.lua".source = ./lua/plugins/catppuccin.lua;
|
||||
".config/nvim/lua/plugins/telescope.lua".source = ./lua/plugins/telescope.lua;
|
||||
".config/nvim/lua/plugins/highlight-colors.lua".source = ./lua/plugins/highlight-colors.lua;
|
||||
@@ -57,7 +57,6 @@ programs.neovim.plugins = [
|
||||
".config/nvim/lua/plugins/tiny-inline-diagnostic.lua".source = ./lua/plugins/tiny-inline-diagnostic.lua;
|
||||
".config/nvim/lua/plugins/conform.lua".source = ./lua/plugins/conform.lua;
|
||||
".config/nvim/lua/plugins/go.lua".source = ./lua/plugins/go.lua;
|
||||
# ".config/nvim/lua/plugins/nvim-tmux-navigation.lua".source = ./lua/plugins/nvim-tmux-navigation.lua;
|
||||
|
||||
}
|
||||
];
|
||||
|
||||
@@ -38,6 +38,7 @@ vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts)
|
||||
-- jump to definition
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts)
|
||||
|
||||
|
||||
-- code actions
|
||||
vim.keymap.set("n", "<leader>ca", function()
|
||||
require("tiny-code-action").code_action()
|
||||
@@ -63,7 +64,9 @@ require("toggleterm").setup({})
|
||||
require("mini.animate").setup()
|
||||
|
||||
vim.o.showtabline = 2
|
||||
require("tabby").setup({})
|
||||
require("tabby").setup({
|
||||
preset = "tab_only"
|
||||
})
|
||||
|
||||
require("tiny-inline-diagnostic").setup({})
|
||||
|
||||
@@ -144,3 +147,8 @@ vim.keymap.set("n", "<leader>ts", ":ToggleTerm direction=vertical <CR>", { desc
|
||||
vim.keymap.set("n", "<leader>ca", function()
|
||||
require("tiny-code-action").code_action()
|
||||
end, { desc = "Show code actions", noremap = true, silent = true })
|
||||
|
||||
|
||||
-- disable annoying inline type things
|
||||
vim.lsp.inlay_hint.enable(false)
|
||||
vim.diagnostic.config({virtual_text = false})
|
||||
|
||||
0
packages/nvim/lua/plugins/comment.lua~
Normal file
0
packages/nvim/lua/plugins/comment.lua~
Normal file
@@ -1,5 +1,4 @@
|
||||
return {
|
||||
|
||||
'nvim-flutter/flutter-tools.nvim',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
@@ -66,7 +65,7 @@ return {
|
||||
focus_on_open = true, -- focus on the newly opened log window
|
||||
},
|
||||
dev_tools = {
|
||||
autostart = false, -- autostart devtools server if not detected
|
||||
autostart = true, -- autostart devtools server if not detected
|
||||
auto_open_browser = false, -- Automatically opens devtools in the browser
|
||||
},
|
||||
outline = {
|
||||
|
||||
0
packages/nvim/lua/plugins/lazydev.lua~
Normal file
0
packages/nvim/lua/plugins/lazydev.lua~
Normal file
13
packages/nvim/lua/plugins/lsp.lua~
Normal file
13
packages/nvim/lua/plugins/lsp.lua~
Normal file
@@ -0,0 +1,13 @@
|
||||
return
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = function()
|
||||
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||
-- change a keymap
|
||||
keys[#keys + 1] = { "K", "<cmd>echo 'hello'<cr>" }
|
||||
-- disable a keymap
|
||||
keys[#keys + 1] = { "K", false }
|
||||
-- add a keymap
|
||||
keys[#keys + 1] = { "H", "<cmd>echo 'hello'<cr>" }
|
||||
end,
|
||||
}
|
||||
0
packages/nvim/lua/plugins/lualine.lua~
Normal file
0
packages/nvim/lua/plugins/lualine.lua~
Normal file
48
packages/nvim/lua/plugins/neominimap.lua
Normal file
48
packages/nvim/lua/plugins/neominimap.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
---@module "neominimap.config.meta"
|
||||
return {
|
||||
"Isrothy/neominimap.nvim",
|
||||
version = "v3.x.x",
|
||||
lazy = false, -- NOTE: NO NEED to Lazy load
|
||||
-- Optional. You can alse set your own keybindings
|
||||
keys = {
|
||||
-- Global Minimap Controls
|
||||
{ "<leader>nm", "<cmd>Neominimap Toggle<cr>", desc = "Toggle global minimap" },
|
||||
{ "<leader>no", "<cmd>Neominimap Enable<cr>", desc = "Enable global minimap" },
|
||||
{ "<leader>nc", "<cmd>Neominimap Disable<cr>", desc = "Disable global minimap" },
|
||||
{ "<leader>nr", "<cmd>Neominimap Refresh<cr>", desc = "Refresh global minimap" },
|
||||
|
||||
-- Window-Specific Minimap Controls
|
||||
{ "<leader>nwt", "<cmd>Neominimap WinToggle<cr>", desc = "Toggle minimap for current window" },
|
||||
{ "<leader>nwr", "<cmd>Neominimap WinRefresh<cr>", desc = "Refresh minimap for current window" },
|
||||
{ "<leader>nwo", "<cmd>Neominimap WinEnable<cr>", desc = "Enable minimap for current window" },
|
||||
{ "<leader>nwc", "<cmd>Neominimap WinDisable<cr>", desc = "Disable minimap for current window" },
|
||||
|
||||
-- Tab-Specific Minimap Controls
|
||||
{ "<leader>ntt", "<cmd>Neominimap TabToggle<cr>", desc = "Toggle minimap for current tab" },
|
||||
{ "<leader>ntr", "<cmd>Neominimap TabRefresh<cr>", desc = "Refresh minimap for current tab" },
|
||||
{ "<leader>nto", "<cmd>Neominimap TabEnable<cr>", desc = "Enable minimap for current tab" },
|
||||
{ "<leader>ntc", "<cmd>Neominimap TabDisable<cr>", desc = "Disable minimap for current tab" },
|
||||
|
||||
-- Buffer-Specific Minimap Controls
|
||||
{ "<leader>nbt", "<cmd>Neominimap BufToggle<cr>", desc = "Toggle minimap for current buffer" },
|
||||
{ "<leader>nbr", "<cmd>Neominimap BufRefresh<cr>", desc = "Refresh minimap for current buffer" },
|
||||
{ "<leader>nbo", "<cmd>Neominimap BufEnable<cr>", desc = "Enable minimap for current buffer" },
|
||||
{ "<leader>nbc", "<cmd>Neominimap BufDisable<cr>", desc = "Disable minimap for current buffer" },
|
||||
|
||||
---Focus Controls
|
||||
{ "<leader>nf", "<cmd>Neominimap Focus<cr>", desc = "Focus on minimap" },
|
||||
{ "<leader>nu", "<cmd>Neominimap Unfocus<cr>", desc = "Unfocus minimap" },
|
||||
{ "<leader>ns", "<cmd>Neominimap ToggleFocus<cr>", desc = "Switch focus on minimap" },
|
||||
},
|
||||
init = function()
|
||||
-- The following options are recommended when layout == "float"
|
||||
vim.opt.wrap = false
|
||||
vim.opt.sidescrolloff = 36 -- Set a large value
|
||||
|
||||
--- Put your configuration here
|
||||
---@type Neominimap.UserConfig
|
||||
vim.g.neominimap = {
|
||||
auto_enable = true,
|
||||
}
|
||||
end,
|
||||
}
|
||||
0
packages/nvim/lua/plugins/whichkey.lua~
Normal file
0
packages/nvim/lua/plugins/whichkey.lua~
Normal file
34
packages/nvim/nvim/plugins/lazy.lua~
Normal file
34
packages/nvim/nvim/plugins/lazy.lua~
Normal file
@@ -0,0 +1,34 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add your plugins here
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
-- install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
48
packages/nvim/nvim/plugins/lsp.lua~
Normal file
48
packages/nvim/nvim/plugins/lsp.lua~
Normal file
@@ -0,0 +1,48 @@
|
||||
local on_attach = function(_, bufnr)
|
||||
|
||||
local bufmap = function(keys, func)
|
||||
vim.keymap.set('n', keys, func, { buffer = bufnr })
|
||||
end
|
||||
|
||||
bufmap('<leader>r', vim.lsp.buf.rename)
|
||||
bufmap('<leader>a', vim.lsp.buf.code_action)
|
||||
|
||||
bufmap('gd', vim.lsp.buf.definition)
|
||||
bufmap('gD', vim.lsp.buf.declaration)
|
||||
bufmap('gI', vim.lsp.buf.implementation)
|
||||
bufmap('<leader>D', vim.lsp.buf.type_definition)
|
||||
|
||||
bufmap('gr', require('telescope.builtin').lsp_references)
|
||||
bufmap('<leader>s', require('telescope.builtin').lsp_document_symbols)
|
||||
bufmap('<leader>S', require('telescope.builtin').lsp_dynamic_workspace_symbols)
|
||||
|
||||
bufmap('K', vim.lsp.buf.hover)
|
||||
|
||||
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, {})
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||
|
||||
require('neodev').setup()
|
||||
require('lspconfig').lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_dir = function()
|
||||
return vim.loop.cwd()
|
||||
end,
|
||||
cmd = { "lua-language-server" },
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
require('lspconfig').rnix.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
5
packages/nvim/nvim/plugins/lualine.lua~
Normal file
5
packages/nvim/nvim/plugins/lualine.lua~
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' }
|
||||
}}
|
||||
7
packages/nvim/nvim/plugins/other.lua~
Normal file
7
packages/nvim/nvim/plugins/other.lua~
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Lualine
|
||||
require("lualine").setup({
|
||||
icons_enabled = true,
|
||||
})
|
||||
|
||||
-- Comment
|
||||
require("Comment").setup()
|
||||
4
packages/nvim/nvim/plugins/telescope.lua~
Normal file
4
packages/nvim/nvim/plugins/telescope.lua~
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
|
||||
}
|
||||
Reference in New Issue
Block a user