add: update config

This commit is contained in:
asep.komarudin 2024-05-17 07:05:11 +07:00
parent a2b9217202
commit 880a48e1a3
8 changed files with 128 additions and 85 deletions

View file

@ -11,8 +11,8 @@
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"code_runner.nvim": { "branch": "main", "commit": "d135c4178bf8980ca5fa4aa6e27ab9ee4373c875" },
"codeium.vim": { "branch": "main", "commit": "9406f13cf3eaa08318b76746bd105a04506cab27" },
"dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" },
"friendly-snippets": { "branch": "main", "commit": "3e9a3f5a0cfcef1741e352c37bda4e82e5eb846a" },
"dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" },
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
"github-nvim-theme": { "branch": "main", "commit": "66dcec1bd3d12f8b0bf3c885069888551a650049" },
"gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" },
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
@ -22,12 +22,13 @@
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mini.animate": { "branch": "main", "commit": "82519630b2760ffc516ebc387bef632f9c07b9f5" },
"mini.indentscope": { "branch": "main", "commit": "a8274b6ea2d868198d27bd91a31ed5ea3a6a5744" },
"noice.nvim": { "branch": "main", "commit": "09102ca2e9a3e9302119fdaf7a059a034e4a626d" },
"noice.nvim": { "branch": "main", "commit": "2c49d4a7fdeaca930bb08a8239bdf5bccc26507b" },
"none-ls-extras.nvim": { "branch": "main", "commit": "336e84b9e43c0effb735b08798ffac382920053b" },
"none-ls.nvim": { "branch": "main", "commit": "f5632db2491fbe02b54f1a321a98548a8ba2bd15" },
"none-ls.nvim": { "branch": "main", "commit": "10c976d633862b9fe16171f5f5f17732bc54e19f" },
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
"nvim-autopairs": { "branch": "master", "commit": "14e97371b2aab6ee70054c1070a123dfaa3e217e" },
"nvim-autopairs": { "branch": "master", "commit": "b0b79e42a28f09719a7da9534c3731fa37319d9b" },
"nvim-cmp": { "branch": "main", "commit": "24122371810089d390847d8ba66325c1f1aa64c0" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-lspconfig": { "branch": "master", "commit": "cf3dd4a290084a868fac0e2e876039321d57111c" },
@ -35,7 +36,7 @@
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" },
"nvim-tree.lua": { "branch": "master", "commit": "78c4c083ed5d47e7fab7627d78ce33d3bcfb88f0" },
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
"nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "0bdccb9c67a42a5e2d99384dc9bfa29b1451528f" },
@ -46,7 +47,8 @@
"promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" },
"smart-splits.nvim": { "branch": "master", "commit": "2179ec0d26aacd4f40c766c79f6ebc83b7001e48" },
"statuscol.nvim": { "branch": "main", "commit": "483b9a596dfd63d541db1aa51ee6ee9a1441c4cc" },
"telescope.nvim": { "branch": "master", "commit": "02a60a83961cf9c80e471599171982a31d1cc853" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
"telescope.nvim": { "branch": "master", "commit": "52f500110bcf9190b44b4d8640162adc86772ec4" },
"toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" },
"vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" },
"vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" },

View file

@ -4,7 +4,7 @@ require("config.lazy")
require("user.colorscheme")
require("user.keymaps")
-- require("user.snip")
-- require("core.neovide")
require("core.neovide")
require("custom.autocmd")
require("custom.keymaps")
-- require("user.nvim-tree")

View file

@ -1,14 +1,35 @@
if vim.g.neovide then
local opts = { noremap = true, silent = true }
vim.g.neovide_input_use_logo = 1 -- enable use of the logo (cmd) key
vim.keymap.set("n", "<c-s>", ":w<CR>") -- Save
vim.keymap.set("v", "<c-c>", '"+y') -- Copy
vim.keymap.set("n", "<c-v>", '"+P') -- Paste normal mode
vim.keymap.set("v", "<c-v>", '"+P') -- Paste visual mode
vim.keymap.set("c", "<c-v>", "<C-R>+") -- Paste command mode
vim.keymap.set("i", "<c-v>", '<ESC>l"+Pli') -- Paste insert mode
vim.keymap.set("n", "<c-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>$i<Right><leader>")
vim.keymap.set("i", "<c-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>$i<Right><leader>")
vim.keymap.set("v", "<c-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>")
vim.keymap.set("n", "<c-s>", ":w<CR>", opts) -- Save
vim.keymap.set("v", "<c-c>", '"+y', opts) -- Copy
vim.keymap.set("n", "<c-v>", '"+P', opts) -- Paste normal mode
vim.keymap.set("v", "<c-v>", '"+P', opts) -- Paste visual mode
vim.keymap.set("x", "<c-v>", '"+P', opts) -- Paste visual mode
vim.keymap.set("c", "<c-v>", "<C-R>+", opts) -- Paste command mode
vim.keymap.set("c", "<c-v>", '"+P', opts) -- Paste command mode
vim.keymap.set("i", "<c-v>", '<ESC>l"+Pli', opts) -- Paste insert mode
vim.keymap.set(
"n",
"<c-/>",
"<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>$i<Right><leader>",
opts
)
vim.keymap.set(
"i",
"<c-/>",
"<esc><cmd>lua require('Comment.api').toggle.linewise.current()<cr>$i<Right><leader>",
opts
)
vim.keymap.set("v", "<c-/>", "<esc><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>", opts)
-- vim.keymap.set("n", "<C-s>", ":w<CR>", opts) -- Save
-- vim.keymap.set("v", "<C-c>", '"+y', opts) -- Copy
-- vim.keymap.set("n", "<C-v>", '"+P', opts) -- Paste normal mode
-- vim.keymap.set("v", "<C-v>", '"+P', opts) -- Paste visual mode
-- vim.keymap.set("c", "<C-v>", "<C-R>+", opts) -- Paste command mode
-- vim.keymap.set("i", "<C-v>", '<ESC>l"+Pli', opts) -- Paste insert mode
-- vim.keymap.set("t", "<C-v>", '<C-\\><C-n>"+Pi', opts)
vim.o.guifont = "Hasklug_Nerd_Font:h15"
vim.g.neovide_padding_top = 0
@ -17,9 +38,8 @@ if vim.g.neovide then
vim.g.neovide_padding_left = 1
-- config for transparent
--vim.g.neovide_transparency = 0.8
vim.g.neovide_hide_mouse_when_typing = false
vim.g.neovide_transparency = 1
vim.g.neovide_hide_mouse_when_typing = false
vim.g.neovide_underline_automatic_scaling = false
vim.g.neovide_refresh_rate_idle = 5
vim.g.neovide_no_idle = true
@ -42,11 +62,19 @@ if vim.g.neovide then
vim.g.neovide_scale_factor = 1
vim.opt.cmdheight = 0
vim.opt.spell = false
vim.g.neovide_window_blurred = true
vim.g.neovide_floating_blur_amount_x = 2.0
vim.g.neovide_floating_blur_amount_y = 2.0
vim.g.neovide_floating_shadow = false
vim.g.neovide_floating_z_height = 10
vim.g.neovide_light_angle_degrees = 45
vim.g.neovide_light_radius = 5
end
-- Allow clipboard copy paste in neovim
vim.g.neovide_input_use_logo = 1
vim.api.nvim_set_keymap("", "<c-v>", "+p<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("!", "<c-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("t", "<c-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<c-v>", "<C-R>+", { noremap = true, silent = true })
-- -- Allow clipboard copy paste in neovim
-- vim.g.neovide_input_use_logo = 1
-- vim.api.nvim_set_keymap("", "<c-v>", "+p<CR>", { noremap = true, silent = true })
-- vim.api.nvim_set_keymap("!", "<c-v>", "<C-R>+", { noremap = true, silent = true })
-- vim.api.nvim_set_keymap("t", "<c-v>", "<C-R>+", { noremap = true, silent = true })
-- vim.api.nvim_set_keymap("v", "<c-v>", "<C-R>+", { noremap = true, silent = true })

View file

@ -3,3 +3,9 @@ local keymap = vim.api.nvim_set_keymap
keymap("n", "]h", '<cmd>lua print("Testing")<cr>', opts)
keymap("n", "f", "<cmd>NvimTreeFindFileToggle<cr><cr><Up>", opts)
-- Allow clipboard copy paste in neovim
vim.api.nvim_set_keymap("", "<C-v>", "+p<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("!", "<C-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("t", "<C-v>", "<C-R>+", { noremap = true, silent = true })
vim.api.nvim_set_keymap("v", "<C-v>", "<C-R>+", { noremap = true, silent = true })

View file

@ -8,7 +8,7 @@ return {
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
local is_transparent = true
local is_transparent = false
local palette = require("github-theme.palette").load("github_dark_dimmed")
require("github-theme").setup({
options = {

View file

@ -1,40 +1,46 @@
local is_neovide = false
if vim.g.neovide then
is_neovide = true
end
return {
-- animations
-- {
-- "echasnovski/mini.animate",
-- event = "InsertEnter",
-- opts = function()
-- -- don't use animate when scrolling with the mouse
-- local mouse_scrolled = false
-- for _, scroll in ipairs({ "Up", "Down" }) do
-- local key = "<ScrollWheel" .. scroll .. ">"
-- vim.keymap.set({ "", "i" }, key, function()
-- mouse_scrolled = true
-- return key
-- end, { expr = true })
-- end
--
-- local animate = require("mini.animate")
-- return {
-- resize = {
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
-- },
-- scroll = {
-- timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
-- subscroll = animate.gen_subscroll.equal({
-- predicate = function(total_scroll)
-- if mouse_scrolled then
-- mouse_scrolled = false
-- return false
-- end
-- return total_scroll > 1
-- end,
-- }),
-- },
-- }
-- end,
-- config = function(_, opts)
-- require("mini.animate").setup(opts)
-- end,
-- },
{
"echasnovski/mini.animate",
event = "BufRead",
enabled = not is_neovide,
opts = function()
-- don't use animate when scrolling with the mouse
local mouse_scrolled = false
for _, scroll in ipairs({ "Up", "Down" }) do
local key = "<ScrollWheel" .. scroll .. ">"
vim.keymap.set({ "", "i" }, key, function()
mouse_scrolled = true
return key
end, { expr = true })
end
local animate = require("mini.animate")
return {
resize = {
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
},
scroll = {
timing = animate.gen_timing.linear({ duration = 150, unit = "total" }),
subscroll = animate.gen_subscroll.equal({
predicate = function(total_scroll)
if mouse_scrolled then
mouse_scrolled = false
return false
end
return total_scroll > 1
end,
}),
},
}
end,
config = function(_, opts)
require("mini.animate").setup(opts)
end,
},
}

View file

@ -1,24 +1,24 @@
return {
-- {
-- "NvChad/nvim-colorizer.lua",
-- opts = {
-- user_default_options = {
-- tailwind = true,
-- },
-- },
-- },
-- {
-- "hrsh7th/nvim-cmp",
-- dependencies = {
-- { "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
-- },
-- opts = function(_, opts)
-- -- original kind icon formatter
-- local format_kinds = opts.formatting.format
-- opts.formatting.format = function(entry, item)
-- format_kinds(entry, item) -- add icons
-- return require("tailwindcss-colorizer-cmp").formatter(entry, item)
-- end
-- end,
-- },
{
"NvChad/nvim-colorizer.lua",
opts = {
user_default_options = {
tailwind = true,
},
},
},
{
"hrsh7th/nvim-cmp",
dependencies = {
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
},
opts = function(_, opts)
-- original kind icon formatter
local format_kinds = opts.formatting.format
opts.formatting.format = function(entry, item)
format_kinds(entry, item) -- add icons
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
end
end,
},
}

View file

@ -20,6 +20,7 @@ return {
{
"folke/noice.nvim",
lazy = true,
enabled = true,
dependencies = {
{ "MunifTanjim/nui.nvim" },
},