mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
feat: finally angular support
This commit is contained in:
60
home/programs/nixvim/extra-config.lua
Normal file
60
home/programs/nixvim/extra-config.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
require("darkman").setup()
|
||||
require("cmp-npm").setup({})
|
||||
require("rest-nvim").setup({})
|
||||
require("actions-preview").setup({})
|
||||
|
||||
-- require("lspconfig").angularls.setup({})
|
||||
|
||||
if vim.g.neovide then
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
local flavour = require("catppuccin").options.background[vim.o.background]
|
||||
local palette = require("catppuccin.palettes").get_palette(flavour)
|
||||
vim.cmd("hi Normal guibg=" .. palette.base)
|
||||
vim.cmd("set pumblend=100")
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
end
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = true,
|
||||
severity_sort = false,
|
||||
})
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
||||
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
local lazygit = Terminal:new({
|
||||
cmd = "lazygit",
|
||||
dir = "git_dir",
|
||||
direction = "float",
|
||||
|
||||
on_open = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
on_close = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
function _lazygit_toggle()
|
||||
lazygit:toggle()
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", { noremap = true, silent = true })
|
||||
Reference in New Issue
Block a user