add direnv

This commit is contained in:
2025-10-23 22:16:42 +09:00
parent f087fd2bdb
commit 3e5e0c52cd
8 changed files with 106 additions and 79 deletions

22
lua/plugins/aerial.lua Normal file
View File

@@ -0,0 +1,22 @@
return {
'stevearc/aerial.nvim',
opts = {
backends = { "treesitter", "lsp", "markdown", "asciidoc", "man" },
layout = {
min_width = 0.9
},
float = {
relative = "win",
min_height = 0.9
},
},
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons"
},
keys = {
{ "\\", "<Cmd>AerialToggle float<CR>", desc = "Aerial toggle floating" }
},
}

View File

@@ -1,46 +1,44 @@
return {
'saghen/blink.pairs',
version = '*', -- (recommended) only required with prebuilt binaries
'saghen/blink.pairs',
-- download prebuilt binaries from github releases
dependencies = 'saghen/blink.download',
-- OR build from source, requires nightly:
-- https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
-- download prebuilt binaries from github releases
-- OR build from source, requires nightly:
-- https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
--- @module 'blink.pairs'
--- @type blink.pairs.Config
opts = {
mappings = {
-- you can call require("blink.pairs.mappings").enable()
-- and require("blink.pairs.mappings").disable()
-- to enable/disable mappings at runtime
enabled = true,
-- or disable with `vim.g.pairs = false` (global) and `vim.b.pairs = false` (per-buffer)
-- and/or with `vim.g.blink_pairs = false` and `vim.b.blink_pairs = false`
disabled_filetypes = {},
-- see the defaults:
-- https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L14
pairs = {},
},
highlights = {
enabled = true,
-- requires require('vim._extui').enable({}), otherwise has no effect
groups = {
'BlinkPairsOrange',
'BlinkPairsPurple',
'BlinkPairsBlue',
},
--- @module 'blink.pairs'
--- @type blink.pairs.Config
opts = {
mappings = {
-- you can call require("blink.pairs.mappings").enable()
-- and require("blink.pairs.mappings").disable()
-- to enable/disable mappings at runtime
enabled = true,
-- or disable with `vim.g.pairs = false` (global) and `vim.b.pairs = false` (per-buffer)
-- and/or with `vim.g.blink_pairs = false` and `vim.b.blink_pairs = false`
disabled_filetypes = {},
-- see the defaults:
-- https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L14
pairs = {},
},
highlights = {
enabled = true,
-- requires require('vim._extui').enable({}), otherwise has no effect
groups = {
'BlinkPairsOrange',
'BlinkPairsPurple',
'BlinkPairsBlue',
},
-- highlights matching pairs under the cursor
matchparen = {
enabled = true,
-- known issue where typing won't update matchparen highlight, disabled by default
group = 'BlinkPairsMatchParen',
},
},
debug = false,
}
-- highlights matching pairs under the cursor
matchparen = {
enabled = true,
-- known issue where typing won't update matchparen highlight, disabled by default
group = 'BlinkPairsMatchParen',
},
},
debug = false,
}
}

10
lua/plugins/glance.lua Normal file
View File

@@ -0,0 +1,10 @@
return {
'dnlhc/glance.nvim',
cmd = 'Glance',
keys = {
{ "gd", "<CMD>Glance definitions<CR>", desc = "Glance definitions" },
{ "gr", "<CMD>Glance references<CR>", desc = "Glance references" },
{ "gy", "<CMD>Glance type_definitions<CR>", desc = "Glance type definitions" },
{ "gm", "<CMD>Glance implementations<CR>", desc = "Glance implementations" },
},
}

View File

@@ -1,32 +1,30 @@
return {
'neovim/nvim-lspconfig',
dependencies = { 'saghen/blink.cmp' },
'neovim/nvim-lspconfig',
dependencies = { 'saghen/blink.cmp' },
lazy = false,
lazy = false,
-- example using `opts` for defining servers
opts = {
inlay_hints = { enabled = true },
servers = {
lua_ls = {}
}
},
config = function(_, opts)
local lspconfig = require('lspconfig')
for server, config in pairs(opts.servers) do
-- passing config.capabilities to blink.cmp merges with the capabilities in your
-- `opts[server].capabilities, if you've defined it
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
lspconfig[server].setup(config)
end
-- example using `opts` for defining servers
opts = {
inlay_hints = { enabled = true },
servers = {
lua_ls = {}
}
},
config = function(_, opts)
local lspconfig = require('lspconfig')
for server, config in pairs(opts.servers) do
-- passing config.capabilities to blink.cmp merges with the capabilities in your
-- `opts[server].capabilities, if you've defined it
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
lspconfig[server].setup(config)
end
end,
local capabilities = require('blink.cmp').get_lsp_capabilities()
-- example calling setup directly for each LSP
config = function()
local capabilities = require('blink.cmp').get_lsp_capabilities()
local lspconfig = require('lspconfig')
lspconfig['lua_ls'].setup({ capabilities = capabilities })
end
lspconfig['clangd'].setup({
capabilities = capabilities,
cmd = { vim.fn.stdpath("config") .. "/shell/clangd-direnv.sh" }
})
end,
}

View File

@@ -2,6 +2,7 @@ return {
"mason-org/mason-lspconfig.nvim",
opts = {
ensure_installed = { "lua_ls", "rust_analyzer", "ts_ls" },
automatic_enable = { exclude = { "clangd" } }
},
lazy = false,
dependencies = {

View File

@@ -1,11 +0,0 @@
return {
"hedyhli/outline.nvim",
lazy = true,
cmd = { "Outline", "OutlineOpen" },
keys = { -- Example mapping to toggle outline
{ "<leader>o", "<cmd>Outline<CR>", desc = "Toggle outline" },
},
opts = {
-- Your setup opts here
},
}