1
Fork 0

Change a lot of neovim stuff

and remove some outdated firefox profiles
This commit is contained in:
Matei Adriel 2024-01-04 05:24:55 +01:00
parent c36f93d9c9
commit a39544b93d
No known key found for this signature in database
18 changed files with 119 additions and 145 deletions
home/features/neovim/config/lua/my/plugins

View file

@ -9,38 +9,11 @@ local lspconfig = {
"folke/neodev.nvim",
config = true,
},
"simrat39/rust-tools.nvim",
},
cond = runtime.blacklist("vscode"),
}
local M = {
lspconfig,
{
"smjonas/inc-rename.nvim",
cmd = "IncRename",
opts = {
input_buffer_type = "dressing",
},
cond = runtime.blacklist("vscode"),
},
}
function M.on_attach(_, _) end
function M.legacy_on_attach(_, bufnr)
-- {{{ Keymap helpers
local opts = function(desc)
return { silent = true, desc = desc, buffer = bufnr }
end
-- }}}
-- {{{ Code actions
local expropts = opts("[R]e[n]ame")
expropts.expr = true
vim.keymap.set("n", "<leader>rn", function()
return ":IncRename " .. vim.fn.expand("<cword>")
end, expropts)
-- }}}
end
local M = lspconfig
-- {{{ General server config
---@type lspconfig.options
@ -147,32 +120,17 @@ end
-- }}}
-- {{{ Main config function
function lspconfig.config()
-- diagnostics_icons()
-- -- {{{ Change on-hover borders
vim.lsp.handlers["textDocument/hover"] =
vim.lsp.with(vim.lsp.handlers.hover, { border = "single" })
vim.lsp.handlers["textDocument/signatureHelp"] =
vim.lsp.with(vim.lsp.handlers.signature_help, { border = "single" })
-- -- }}}
-- }}}
local capabilities = M.capabilities()
-- Setup basic language servers
for lsp, details in pairs(servers) do
require("lspconfig")[lsp].setup({
on_attach = details.on_attach,
settings = details.settings, -- Specific per-language settings
cmd = details.cmd,
capabilities = capabilities,
})
details.capabilities = capabilities
require("lspconfig")[lsp].setup(details)
end
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = function(ev)
local client = vim.lsp.get_client_by_id(ev.data.client_id)
M.legacy_on_attach(client, ev.buf)
end,
})
end
--}}}

View file

@ -1,4 +1,4 @@
local H = require("my.helpers.theme")
local H = require("my.tempest")
local M = {
"uloco/bluloco.nvim",
@ -12,7 +12,7 @@ function M.config()
bluloco.setup({
transparent = H.theme.opacity.terminal < 1.0,
style = H.variant("Bluloco"),
style = H.theme_variant("Bluloco"),
})
vim.cmd("colorscheme bluloco")

View file

@ -1,4 +1,4 @@
local H = require("my.helpers.theme")
local H = require("my.tempest")
local M = {
"catppuccin/nvim",
@ -9,7 +9,7 @@ local M = {
function M.config()
local catppuccin = require("catppuccin")
vim.g.catppuccin_flavour = H.variant("Catppuccin")
vim.g.catppuccin_flavour = H.theme_variant("Catppuccin")
catppuccin.setup({
transparent_background = H.theme.transparent.terminal,

View file

@ -1,4 +1,4 @@
local H = require("my.helpers.theme")
local H = require("my.tempest")
local M = {
"rose-pine/neovim",
@ -8,7 +8,7 @@ local M = {
}
function M.config()
local variant = H.variant("Rosé Pine")
local variant = H.theme_variant("Rosé Pine")
if variant == "dawn" then
vim.o.background = "light"