Change a lot of neovim stuff
and remove some outdated firefox profiles
This commit is contained in:
parent
c36f93d9c9
commit
a39544b93d
18 changed files with 119 additions and 145 deletions
home/features/neovim/config/lua/my
|
@ -13,6 +13,7 @@ M.types = {
|
|||
{ "tlis", "List" },
|
||||
{ "tmay", "Maybe" },
|
||||
{ "teff", "Effect" },
|
||||
{ "tio", "IO" },
|
||||
{ "taff", "Aff" },
|
||||
{ "tnea", "NonEmptyArray" },
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ local M = {}
|
|||
M.no_capitalization = { capitalized = false }
|
||||
|
||||
function M.localAbbr(lhs, rhs)
|
||||
-- Create abbreviation
|
||||
vim.cmd(":iabbrev <buffer> " .. lhs .. " " .. rhs)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
local theme = vim.g.nix_theme
|
||||
|
||||
local M = {}
|
||||
M.theme = theme
|
||||
|
||||
function M.theme_contains(name)
|
||||
return string.find(theme.name, name) ~= nil
|
||||
end
|
||||
|
||||
function M.variant(name)
|
||||
-- +1 for 1-indexed strings and +1 for the space between name and variant
|
||||
return string.lower(string.sub(theme.name, string.len(name) + 2))
|
||||
end
|
||||
|
||||
return M
|
|
@ -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
|
||||
--}}}
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -306,5 +306,19 @@ function M.prepareLazySpec(spec)
|
|||
end
|
||||
end
|
||||
-- }}}
|
||||
-- {{{ Theming
|
||||
local theme = vim.g.nix_theme
|
||||
|
||||
M.theme = theme
|
||||
|
||||
function M.theme_contains(name)
|
||||
return string.find(theme.name, name) ~= nil
|
||||
end
|
||||
|
||||
function M.theme_variant(name)
|
||||
-- +1 for 1-indexed strings and +1 for the space between name and variant
|
||||
return string.lower(string.sub(theme.name, string.len(name) + 2))
|
||||
end
|
||||
-- }}}
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue