diff --git a/ftplugin/cpp.lua b/ftplugin/cpp.lua deleted file mode 100644 index 74fc947..0000000 --- a/ftplugin/cpp.lua +++ /dev/null @@ -1,51 +0,0 @@ --- local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig") --- if not lspconfig_status_ok then --- return --- end --- --- local status_ok, configs = pcall(require, "nvim-treesitter.configs") --- if not status_ok then --- return --- end --- --- local mason_ok, mason_lsp = pcall(require, "mason-lspconfig") --- if not mason_ok then --- return --- end --- --- mason_lsp.setup({ --- ensure_installed = { "clangd" }, --- automatic_installation = true, --- }) --- --- lspconfig.clangd.setup({ --- on_attach = require("user.lsp.handlers").on_attach, --- capabilities = require("user.lsp.handlers").capabilities, --- root_dir = require("lspconfig.util").root_pattern( --- "build", --- "compile_commands.json", --- ".git", --- "mvnw", --- "gradlew", --- "pom.xml", --- "build.gradle" --- ) or vim.loop.cwd() or vim.fn.getcwd(), --- }) --- --- configs.setup({ --- ensure_installed = { "cpp" }, -- pastikan parser TypeScript terinstal --- highlight = { --- enable = true, -- aktifkan highlight berbasis treesitter --- additional_vim_regex_highlighting = false, --- }, --- rainbow = { --- enable = false, --- }, --- incremental_selection = { enable = true }, --- indent = { enable = true, disable = { "python", "css" } }, --- autopairs = { --- enable = true, --- }, --- }) --- --- require("nvim-ts-autotag").setup() diff --git a/ftplugin/html.lua b/ftplugin/html.lua deleted file mode 100644 index d892aaf..0000000 --- a/ftplugin/html.lua +++ /dev/null @@ -1,7 +0,0 @@ -vim.g.mapleader = " " -vim.g.maplocalleader = " " - -local opt = vim.opt - -opt.shiftwidth = 2 -- Size of an indent -opt.tabstop = 2 -- Size of an indent diff --git a/ftplugin/javascript.lua b/ftplugin/javascript.lua deleted file mode 100644 index 0c2615a..0000000 --- a/ftplugin/javascript.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.opt_local.expandtab = true -vim.opt_local.shiftwidth = 2 -vim.opt_local.tabstop = 2 -vim.opt_local.softtabstop = 2 diff --git a/ftplugin/lua.lua b/ftplugin/lua.lua deleted file mode 100644 index 0c2615a..0000000 --- a/ftplugin/lua.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.opt_local.expandtab = true -vim.opt_local.shiftwidth = 2 -vim.opt_local.tabstop = 2 -vim.opt_local.softtabstop = 2 diff --git a/lazy-lock.json b/lazy-lock.json index d64f119..0cc7235 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,5 +1,6 @@ { "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" }, + "Eva-Theme.nvim": { "branch": "master", "commit": "902dd17975a7710e544d409ea856dbecc9d64997" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, "auto-conform.nvim": { "branch": "main", "commit": "d04389f955dd0990e85a269b226199f458de32a6" }, @@ -15,24 +16,23 @@ "code_runner.nvim": { "branch": "main", "commit": "6c5bfe44a6c7523350cd706e6b3b8101166eed99" }, "codeium.nvim": { "branch": "main", "commit": "f6a2ef32a9e923cb0104a19d3e426b0e40e49505" }, "conform.nvim": { "branch": "master", "commit": "60e6fbddbdf37d7790de07dc7420beefaf650e5e" }, - "darcula-dark.nvim": { "branch": "main", "commit": "cce636860dc5151b6980a35dd378f54a238e0f0e" }, "dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" }, - "friendly-snippets": { "branch": "main", "commit": "45a1b96e46efe5fce8af325d4bed45feb9d29d0f" }, + "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, "gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" }, "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, - "lazy.nvim": { "branch": "main", "commit": "070418dca1417e7df5c803d7366fd0c7b3e9c612" }, - "live-server.nvim": { "branch": "main", "commit": "f34ae262bf046981d9e5f7cd4f41a353a9647a22" }, - "lsp-progress.nvim": { "branch": "main", "commit": "c5858bba2043cac5ad4113fe1263366125b1b314" }, - "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" }, + "lazy.nvim": { "branch": "main", "commit": "b02c9eae6a250f98908c146d1dc1a891f5019f0a" }, + "live-server.nvim": { "branch": "main", "commit": "fde21e3dc4f0349dfe2bd527d1562df5dcf497aa" }, + "lsp-progress.nvim": { "branch": "main", "commit": "d5f4d28efe75ce636bfbe271eb45f39689765aab" }, + "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "4ba55f9755ebe8297d92c419b90a946123292ae6" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mini.indentscope": { "branch": "main", "commit": "1222393d9c5e8d92b913ccab6701a7164b21781c" }, "neoscroll.nvim": { "branch": "master", "commit": "a731f66f1d39ec6175fd201c5bf849e54abda99c" }, - "noice.nvim": { "branch": "main", "commit": "1cbf3a4c81c7f519f177182f541e7b0514cde3c3" }, + "noice.nvim": { "branch": "main", "commit": "d53a913c34eafb07970b8cd0505087898a92499f" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, - "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-cmp": { "branch": "main", "commit": "e1757aea6145d14208f3035f6b56c99e36593799" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-dap": { "branch": "master", "commit": "5ba8ceace596360321cf33fa4b56d9d46e057ce9" }, "nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" }, @@ -45,9 +45,9 @@ "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-scrollview": { "branch": "main", "commit": "30ca6e18265928eb4ea7402346b4dfddbd8ce41e" }, "nvim-tree.lua": { "branch": "master", "commit": "f9ff00bc06d7cb70548a3847d7a2a05e928bc988" }, - "nvim-treesitter": { "branch": "master", "commit": "7f4ac678770175cdf0d42c015f4a5b6e18b6cb33" }, + "nvim-treesitter": { "branch": "master", "commit": "a6b2f4ecc8a47011868632142a9b687d7e0f9aaf" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, - "nvim-ts-autotag": { "branch": "main", "commit": "323a3e16ed603e2e17b26b1c836d1e86c279f726" }, + "nvim-ts-autotag": { "branch": "main", "commit": "26c365cc7d58d0da17b13e747855d331eb26fcf0" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" }, "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "playground": { "branch": "master", "commit": "bcfab84f98a33f2ad34dda6c842046dca70aabf6" }, @@ -62,6 +62,6 @@ "vim-startuptime": { "branch": "master", "commit": "97a88e688482a09c3c4b777d07b509b328a5ec29" }, "vim-visual-multi": { "branch": "master", "commit": "38b0e8d94a5499ccc17d6159763d32c79f53417b" }, "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" }, - "which-key.nvim": { "branch": "main", "commit": "a86e9d3c0023f985344014bf2b7cb15e0be8fa2b" }, + "which-key.nvim": { "branch": "main", "commit": "b55a568ae69724e334aec3ef291ea4e1768ba47a" }, "yanky.nvim": { "branch": "main", "commit": "9268018e92d02650a94e39dd5f5903c542f7ea11" } -} \ No newline at end of file +} diff --git a/lua/custom/default.lua b/lua/custom/default.lua index 7f453df..1db48f8 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -14,7 +14,8 @@ -- solarized-osaka -- darcula-dark -- juliana -pcode.colorscheme = "darcula-dark" +-- Eva-Dark, Eva-Dark-Italic, Eva-Dark-Bold +pcode.colorscheme = "Eva-Dark-Italic" -- 0 =off 1= on pcode.transparent_mode = 0 diff --git a/lua/plugins/themes/evatheme.lua b/lua/plugins/themes/evatheme.lua new file mode 100644 index 0000000..b616055 --- /dev/null +++ b/lua/plugins/themes/evatheme.lua @@ -0,0 +1,39 @@ +local clr = pcode.colorscheme or "gruvbox-baby" +if substring(tostring(clr), "Eva") and true or false then + return { + "sharpchen/Eva-Theme.nvim", + lazy = false, + priority = 1000, + config = function() + require("Eva-Theme").setup({}) + local color = require("Eva-Theme.palette").dark + vim.api.nvim_create_autocmd("ColorScheme", { + pattern = "*", + callback = function() + local hi = vim.api.nvim_set_hl + hi(0, "LspInfoBorder", { fg = "#2F3F5C" }) + hi(0, "FloatBorder", { fg = "#2F3F5C" }) + hi(0, "StatusLine", { bg = color.background }) + hi(0, "StatusLineNC", { bg = color.background }) + hi(0, "WinBar", { bg = color.background }) + hi(0, "WinBarNC", { bg = color.background }) + hi(0, "NormalFloat", { bg = color.background }) + hi(0, "NormalNC", { bg = color.background }) + hi(0, "@tag.delimiter.javascript", { fg = "#838FA7" }) + hi(0, "@tag.delimiter.tsx", { fg = "#838FA7" }) + -- git + hi(0, "NvimTreeGitNewIcon", { bg = color.dark, fg = color.git.added }) + hi(0, "NvimTreeGitRenamedIcon", { bg = color.dark, fg = color.git.added }) + hi(0, "NvimTreeGitDeletedIcon", { bg = color.dark, fg = color.git.stagedDeleted }) + hi(0, "NvimTreeGitDirtyIcon", { bg = color.dark, fg = color.git.diffModified }) + hi(0, "NvimTreeGitIgnoredIcon", { bg = color.dark, fg = color.git.ignored }) + hi(0, "NvimTreeGitMergeIcon", { bg = color.dark, fg = color.git.diffModified }) + hi(0, "NvimTreeGitStagedIcon", { bg = color.dark, fg = color.git.stagedModified }) + hi(0, "MiniIndentscopeSymbol", { bg = color.dark, fg = color.parameter }) + end, + }) + end, + } +else + return {} +end diff --git a/lua/plugins/themes/jetbrains.lua b/lua/plugins/themes/jetbrains.lua index 517fe0a..2d245f8 100644 --- a/lua/plugins/themes/jetbrains.lua +++ b/lua/plugins/themes/jetbrains.lua @@ -10,6 +10,7 @@ if (color == "darcula-dark") and true or false then require("darcula").setup({ colors = { lavender = "#9876AA", + statusline = "NONE", }, }) vim.api.nvim_create_autocmd("ColorScheme", { diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua index 432ea93..e77a561 100644 --- a/lua/plugins/whichkey.lua +++ b/lua/plugins/whichkey.lua @@ -27,22 +27,58 @@ return { }, -- add operators that will trigger motion and text object completion -- to enable all native operators, set the preset / operators plugin above -- operators = { gc = "Comments" }, - key_labels = { - -- override the label used to display some keys. It doesn't effect WK in any other way. - -- For example: - -- [""] = "SPC", - -- [""] = "RET", - -- [""] = "TAB", + replace = { + key = { + function(key) + return require("which-key.view").format(key) + end, + -- { "", "SPC" }, + }, + desc = { + { "%((.*)%)", "%1" }, + { "^%+", "" }, + { "<[cC]md>", "" }, + { "<[cC][rR]>", "" }, + { "<[sS]ilent>", "" }, + { "^lua%s+", "" }, + { "^call%s+", "" }, + { "^:%s*", "" }, + }, }, icons = { rules = false, breadcrumb = icons.ui.DoubleChevronRight, -- symbol used in the command line area that shows your active key combo separator = icons.ui.BoldArrowRight, -- symbol used between a key and it's label group = icons.ui.Plus, -- symbol prepended to a group - }, - popup_mappings = { - scroll_down = "", -- binding to scroll down inside the popup - scroll_up = "", -- binding to scroll up inside the popup + keys = { + Up = " ", + Down = " ", + Left = " ", + Right = " ", + C = "󰘴 ", + M = "󰘵 ", + S = "󰘶 ", + CR = "󰌑 ", + Esc = "󱊷 ", + ScrollWheelDown = "󱕐 ", + ScrollWheelUp = "󱕑 ", + NL = "󰌑 ", + BS = "⌫ ", + Space = "󱁐 ", + Tab = "󰌒 ", + F1 = "󱊫", + F2 = "󱊬", + F3 = "󱊭", + F4 = "󱊮", + F5 = "󱊯", + F6 = "󱊰", + F7 = "󱊱", + F8 = "󱊲", + F9 = "󱊳", + F10 = "󱊴", + F11 = "󱊵", + F12 = "󱊶", + }, }, win = { -- width = 1, @@ -66,46 +102,19 @@ return { spacing = 3, -- spacing between columns align = "left", -- align columns left, center or right }, - ignore_missing = true, -- enable this to hide mappings for which you didn't specify a label - hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate show_help = true, -- show help message on the command line when the popup is visible show_keys = true, -- show the currently pressed key and its label as a message in the command line triggers = "auto", -- automatically setup triggers - -- triggers = {""} -- or specify a list manually - triggers_blacklist = { - -- list of mode / prefixes that should never be hooked by WhichKey - -- this is mostly relevant for key maps that start with a native binding - -- most people should not need to change this - i = { "j", "k" }, - v = { "j", "k" }, - }, -- Disabled by default for Telescope disable = { buftypes = {}, filetypes = { "TelescopePrompt" }, }, + ---@type false | "classic" | "modern" | "helix" + preset = "classic", } end, config = function(_, opts) - -- local opt = { - -- mode = "n", -- NORMAL mode - -- prefix = "", - -- buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings - -- silent = true, -- use `silent` when creating keymaps - -- noremap = true, -- use `noremap` when creating keymaps - -- nowait = true, -- use `nowait` when creating keymaps - -- } - -- - -- local opt2 = { - -- mode = "v", -- NORMAL mode - -- prefix = "", - -- buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings - -- silent = true, -- use `silent` when creating keymaps - -- noremap = true, -- use `noremap` when creating keymaps - -- nowait = true, -- use `nowait` when creating keymaps - -- } - -- - -- local wkey = pcode.whichkey or {} local which_key = require("which-key") which_key.setup(opts) which_key.add({ diff --git a/lua/user/catppuccin.lua b/lua/user/catppuccin.lua deleted file mode 100644 index aa7238e..0000000 --- a/lua/user/catppuccin.lua +++ /dev/null @@ -1,54 +0,0 @@ --- local transparent = false --- local data_exists, custom_ui = pcall(require, "custom.ui") --- if not data_exists then --- return --- end --- local transparent_mode = custom_ui.transparent_mode --- if transparent_mode ~= nil then --- if transparent_mode == 1 then --- transparent = true --- end --- end --- --- require("catppuccin").setup({ --- flavour = "macchiato", -- latte, frappe, macchiato, mocha --- background = { -- :h background --- light = "latte", --- dark = "macchiato", --- }, --- transparent_background = transparent, --- show_end_of_buffer = false, -- show the '~' characters after the end of buffers --- term_colors = false, --- dim_inactive = { --- enabled = false, --- shade = "dark", --- percentage = 0.15, --- }, --- no_italic = false, -- Force no italic --- no_bold = false, -- Force no bold --- styles = { --- comments = { "italic" }, --- conditionals = { "italic" }, --- loops = {}, --- functions = {}, --- keywords = {}, --- strings = {}, --- variables = {}, --- numbers = {}, --- booleans = {}, --- properties = {}, --- types = {}, --- operators = {}, --- }, --- color_overrides = {}, --- custom_highlights = {}, --- integrations = { --- cmp = true, --- gitsigns = true, --- nvimtree = true, --- telescope = true, --- notify = false, --- mini = false, --- -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) --- }, --- }) diff --git a/lua/user/chat_gpt.lua b/lua/user/chat_gpt.lua deleted file mode 100644 index ab45f31..0000000 --- a/lua/user/chat_gpt.lua +++ /dev/null @@ -1,76 +0,0 @@ --- local status_ok, chatgpt = pcall(require, "chatgpt") --- if not status_ok then --- return --- end --- local WELCOME_MESSAGE = [[ --- Welcome to ChatGPT. --- ]] --- chatgpt.setup({ --- welcome_message = WELCOME_MESSAGE, -- set to "" if you don't like the fancy godot robot --- loading_text = "loading", --- question_sign = "", -- you can use emoji if you want e.g. 🙂 --- answer_sign = "ﮧ", -- 🤖 --- max_line_length = 120, --- yank_register = "+", --- chat_layout = { --- relative = "editor", --- position = "50%", --- size = { --- height = "80%", --- width = "80%", --- }, --- }, --- settings_window = { --- border = { --- style = "rounded", --- text = { --- top = " Settings ", --- }, --- }, --- }, --- chat_window = { --- filetype = "chatgpt", --- border = { --- highlight = "FloatBorder", --- style = "rounded", --- text = { --- top = " ChatGPT ", --- }, --- }, --- }, --- chat_input = { --- prompt = "  ", --- border = { --- highlight = "FloatBorder", --- style = "rounded", --- text = { --- top_align = "center", --- top = " Prompt ", --- }, --- }, --- }, --- openai_params = { --- model = "text-davinci-003", --- frequency_penalty = 0, --- presence_penalty = 0, --- max_tokens = 300, --- temperature = 0, --- top_p = 1, --- n = 1, --- }, --- openai_edit_params = { --- model = "code-davinci-edit-001", --- temperature = 0, --- top_p = 1, --- n = 1, --- }, --- keymaps = { --- close = { "", "" }, --- yank_last = "", --- scroll_up = "", --- scroll_down = "", --- toggle_settings = "", --- new_session = "", --- cycle_windows = "", --- }, --- }) diff --git a/lua/user/format_onsave.lua b/lua/user/format_onsave.lua deleted file mode 100644 index 06a1e9c..0000000 --- a/lua/user/format_onsave.lua +++ /dev/null @@ -1,71 +0,0 @@ --- local run = 0 --- local frmt = pcode.format_on_save or 0 --- if frmt == 1 then --- run = 1 --- else --- run = 0 --- end --- --- local buf_clients = vim.lsp.get_clients() --- if next(buf_clients) == nil then --- run = 0 --- end --- --- if run == 1 then --- -- function FORMAT_FILTER(client) --- -- local filetype = vim.bo.filetype --- -- local n = require("null-ls") --- -- local s = require("null-ls.sources") --- -- local method = n.methods.FORMATTING --- -- local available_formatters = s.get_available(filetype, method) --- -- --- -- if #available_formatters > 0 then --- -- return client.name == "null-ls" --- -- elseif client.supports_method("textDocument/formatting") then --- -- return true --- -- else --- -- return false --- -- end --- -- end --- -- --- -- vim.cmd([[ --- -- augroup _lsp --- -- autocmd! --- -- " autocmd BufWritePre * lua vim.lsp.buf.format{timeout_ms =200, filter=format_filter} --- -- autocmd BufWritePre * lua vim.lsp.buf.format{timeout_ms=pcode.format_timeout_ms or 5000 ,filter=FORMAT_FILTER} --- -- augroup end --- -- ]]) --- --- ---filter passed to vim.lsp.buf.format --- ---always selects null-ls if it's available and caches the value per buffer --- ---@param client table client attached to a buffer --- ---@return boolean if client matches --- function FORMAT_FILTER(client) --- local filetype = vim.bo.filetype --- local n = require("null-ls") --- local s = require("null-ls.sources") --- local method = n.methods.FORMATTING --- local available_formatters = s.get_available(filetype, method) --- --- if #available_formatters > 0 then --- return client.name == "null-ls" --- elseif client.supports_method("textDocument/formatting") then --- return true --- else --- return false --- end --- end --- vim.api.nvim_create_autocmd("BufWritePre", { --- group = "lsp_format_on_save", --- pattern = "*", --- callback = function() --- vim.lsp.buf.format({ timeout_ms = pcode.format_timeout_ms or 5000, filter = FORMAT_FILTER }) --- end, --- }) --- else --- vim.schedule(function() --- pcall(function() --- vim.api.nvim_clear_autocmds({ group = "lsp_format_on_save" }) --- end) --- end) --- end diff --git a/lua/user/impatient.lua b/lua/user/impatient.lua deleted file mode 100644 index 0881dac..0000000 --- a/lua/user/impatient.lua +++ /dev/null @@ -1,6 +0,0 @@ --- local status_ok, impatient = pcall(require, "impatient") --- if not status_ok then --- return --- end --- --- impatient.enable_profile() diff --git a/lua/user/jaq.lua b/lua/user/jaq.lua deleted file mode 100644 index d122802..0000000 --- a/lua/user/jaq.lua +++ /dev/null @@ -1,86 +0,0 @@ --- M = {} --- local status_ok, jaq_nvim = pcall(require, "jaq-nvim") --- if not status_ok then --- return --- end --- --- jaq_nvim.setup({ --- -- Commands used with 'Jaq' --- cmds = { --- -- Default UI used (see `Usage` for options) --- default = "term", --- --- -- Uses external commands such as 'g++' and 'cargo' --- external = { --- typescript = "deno run %", --- javascript = "node %", --- -- markdown = "glow %", --- python = "python %", --- -- rust = "rustc % && ./$fileBase && rm $fileBase", --- rust = "cargo run", --- cpp = "g++ % -o $fileBase && ./$fileBase", --- go = "go run %", --- sh = "sh %", --- java = "java %", --- }, --- --- -- Uses internal commands such as 'source' and 'luafile' --- internal = { --- -- lua = "luafile %", --- -- vim = "source %", --- }, --- }, --- --- behavior = { --- -- Default type --- default = "terminal", --- --- -- Start in insert mode --- startinsert = false, --- --- -- Use `wincmd p` on startup --- wincmd = false, --- --- -- Auto-save files --- autosave = false, --- }, --- --- -- UI settings --- ui = { --- -- Floating Window / FTerm settings --- float = { --- -- Floating window border (see ':h nvim_open_win') --- border = "rounded", -- none, single, double, rounded --- --- -- Num from `0 - 1` for measurements --- height = 0.8, --- width = 0.8, --- x = 0.5, --- y = 0.5, --- --- -- Highlight group for floating window/border (see ':h winhl') --- border_hl = "FloatBorder", --- float_hl = "Normal", --- --- -- Floating Window Transparency (see ':h winblend') --- blend = 0, --- }, --- --- terminal = { --- -- Position of terminal --- position = "bot", --- --- -- Open the terminal without line numbers --- line_no = false, --- --- -- Size of terminal --- size = 20, --- }, --- }, --- }) --- --- local opts = { noremap = true, silent = true } --- local keymap = vim.api.nvim_set_keymap --- --- keymap("n", "", ":silent only | Jaq", opts) --- return M diff --git a/lua/user/lsp/init.lua b/lua/user/lsp/init.lua deleted file mode 100644 index 8b38610..0000000 --- a/lua/user/lsp/init.lua +++ /dev/null @@ -1,9 +0,0 @@ --- local status_ok, _ = pcall(require, "lspconfig") --- if not status_ok then --- return --- end --- --- require("user.lsp.mason_cfg") --- --require("user.lsp.config") -- ini hanya untuk windows supaya jdtls jalan, kalau pakai linu x remark saja --- require("user.lsp.handlers").setup() --- --require("user.lsp.null-lscfg") diff --git a/lua/user/lsp/mason_cfg.lua b/lua/user/lsp/mason_cfg.lua deleted file mode 100644 index cf76fda..0000000 --- a/lua/user/lsp/mason_cfg.lua +++ /dev/null @@ -1,110 +0,0 @@ --- local servers = { --- "lua_ls", --- } --- --- local function idxOf(array, value) --- for i, v in ipairs(array) do --- if v == value then --- return i --- end --- end --- return nil --- end --- --- local mason_install = pcode.mason_ensure_installed or {} --- for _, client in pairs(mason_install) do --- table.insert(servers, client) --- end --- --- local unregis_lsp = pcode.unregister_lsp or {} --- local icons = pcode.icons.ui --- --- local settings = { --- ui = { --- -- border = "none", --- border = icons.Border, --- icons = { --- package_pending = icons.DotCircle, --- package_installed = icons.CheckCircle, --- package_uninstalled = icons.BlankCircle, --- }, --- keymaps = { --- -- Keymap to expand a server in the UI --- toggle_server_expand = "", --- -- Keymap to install the server under the current cursor position --- install_server = "i", --- -- Keymap to reinstall/update the server under the current cursor position --- update_server = "u", --- -- Keymap to check for new version for the server under the current cursor position --- check_server_version = "c", --- -- Keymap to update all installed servers --- update_all_servers = "U", --- -- Keymap to check which installed servers are outdated --- check_outdated_servers = "C", --- -- Keymap to uninstall a server --- uninstall_server = "X", --- }, --- }, --- log_level = vim.log.levels.INFO, --- max_concurrent_installers = 4, --- } --- --- require("mason").setup(settings) --- -- * buka remark ini jika akan menggunakan list serverrs diatas dan remark config dibawah --- require("mason-lspconfig").setup({ --- ensure_installed = servers, --- automatic_installation = true, --- }) --- -- --- -- * buka remark ini jika ingin menjalankan dengan cara install dan remark config diatas (pilih satu) --- -- require("mason-lspconfig").setup() --- --- local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig") --- if not lspconfig_status_ok then --- return --- end --- --- local opts = {} --- --- require("mason-lspconfig").setup_handlers({ --- function(server_name) -- default handler (optional) --- local capabilities = require("user.lsp.handlers").capabilities --- if server_name == "clangd" then --- capabilities.offsetEncoding = { "utf-16" } --- end --- local is_skip = false --- local my_index = idxOf(unregis_lsp, server_name) --- if my_index ~= nil then --- is_skip = true --- end --- if not is_skip then --- opts = { --- on_attach = require("user.lsp.handlers").on_attach, --- capabilities = capabilities, --- } --- --- server_name = vim.split(server_name, "@")[1] --- --- local require_ok, conf_opts = pcall(require, "user.lsp.settings." .. server_name) --- if require_ok then --- opts = vim.tbl_deep_extend("force", conf_opts, opts) --- end --- lspconfig[server_name].setup(opts) --- end --- end, --- -- Next, you can provide targeted overrides for specific servers. --- -- ["rust_analyzer"] = function() --- -- require("rust-tools").setup({}) --- -- end, --- -- ["lua_ls"] = function() --- -- lspconfig.sumneko_lua.setup({ --- -- settings = { --- -- Lua = { --- -- diagnostics = { --- -- globals = { "vim" }, --- -- }, --- -- }, --- -- }, --- -- }) --- -- end, --- }) diff --git a/lua/user/lsp/null-lscfg.lua b/lua/user/lsp/null-lscfg.lua deleted file mode 100644 index ea9439e..0000000 --- a/lua/user/lsp/null-lscfg.lua +++ /dev/null @@ -1,84 +0,0 @@ --- local null_ls_status_ok, null_ls = pcall(require, "null-ls") --- if not null_ls_status_ok then --- return --- end --- --- -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting --- local formatting = null_ls.builtins.formatting --- -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics --- local diagnostics = null_ls.builtins.diagnostics --- --- local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) --- --- local sources = {} --- local ensure_installed = {} --- --- local data_ok, data_sources = pcall(require, "custom.null-ls") --- if data_ok then --- for _, cfg in pairs(data_sources.sources) do --- table.insert(sources, cfg) --- end --- end --- --- -- load data null-ls --- local nullls_data = pcode.null_ls_ensure_installed or {} --- for _, nullls in pairs(nullls_data) do --- table.insert(ensure_installed, nullls) --- end --- --- local mason_ok, mason_null_ls = pcall(require, "mason-null-ls") --- if mason_ok then --- mason_null_ls.setup({ --- ensure_installed = ensure_installed, --- }) --- end --- --- local run = 0 --- local frmt = pcode.format_on_save or 0 --- if frmt == 1 then --- run = 1 --- end --- --- if run == 1 then --- null_ls.setup({ --- debug = false, --- ensure_installed = ensure_installed, --- sources = sources, --- --sources = { --- --formatting.prettier.with({ extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }), --- --formatting.prettier, --- -- formatting.prettierd, --- -- formatting.black.with({ extra_args = { "--fast" } }), --- -- formatting.stylua, --- -- formatting.eslint_d, --- -- formatting.google_java_format, --- -- formatting.phpcbf, --- -- formatting.clang_format, --- -- diagnostics.flake8 --- -- diagnostics.eslint_d, --- --}, --- --- on_attach = function(client, bufnr) --- --if client.resolved_capabilities.document_formatting then --- --vim.cmd("autocmd BufWritePre lua vim.lsp.buf.format{async=true}") --- --end --- if client.supports_method("textDocument/formatting") then --- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) --- vim.api.nvim_create_autocmd("BufWritePre", { --- group = augroup, --- buffer = bufnr, --- callback = function() --- vim.lsp.buf.format({ bufnr = bufnr }) --- -- vim.lsp.buf.formatting_sync() --- end, --- }) --- end --- end, --- }) --- else --- null_ls.setup({ --- debug = false, --- ensure_installed = ensure_installed, --- sources = sources, --- }) --- end diff --git a/lua/user/mason-null-ls.lua b/lua/user/mason-null-ls.lua deleted file mode 100644 index 0d0bb15..0000000 --- a/lua/user/mason-null-ls.lua +++ /dev/null @@ -1,12 +0,0 @@ --- local status_ok, mason_null_ls = pcall(require, "mason-null-ls") --- if not status_ok then --- return --- end --- mason_null_ls.setup({ --- ensure_installed = { --- -- Opt to list sources here, when available in mason. --- }, --- automatic_setup = true, --- handlers = {}, --- }) --- -- mason_null_ls.setup_handlers({}) diff --git a/lua/user/mason_dap.lua b/lua/user/mason_dap.lua deleted file mode 100644 index d9a04d7..0000000 --- a/lua/user/mason_dap.lua +++ /dev/null @@ -1,18 +0,0 @@ --- local sources = {} --- local dap_data = pcode.dap_ensure_installed or {} --- for _, nullls in pairs(dap_data) do --- table.insert(sources, nullls) --- end --- require("mason").setup() --- require("mason-nvim-dap").setup({ --- ensure_installed = sources, --- automatic_setup = true, --- handlers = { --- function(config) --- -- all sources with no handler get passed here --- --- -- Keep original functionality --- require("mason-nvim-dap").default_setup(config) --- end, --- }, --- }) diff --git a/lua/user/tokyonight.lua b/lua/user/tokyonight.lua deleted file mode 100644 index d21f939..0000000 --- a/lua/user/tokyonight.lua +++ /dev/null @@ -1,71 +0,0 @@ --- local status_ok, tokyonight = pcall(require, "tokyonight") --- if not status_ok then --- return --- end --- local transp = false --- local sidebar = "normal" --"dark , transparent, normal" --- local hilight = "#292e42" --- local tras = pcode.transparent_mode or 0 --- if tras == 1 then --- transp = true --- sidebar = "transparent" --- -- hilight = "#3E4254" --- -- hilight = "#353a56" --- hilight = "#292e42" --- end --- --- tokyonight.setup({ --- -- your configuration comes here --- -- or leave it empty to use the default settings --- style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day` --- light_style = "day", -- The theme is used when the background is set to light --- transparent = transp, -- Enable this to disable setting the background color --- terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim --- styles = { --- -- Style to be applied to different syntax groups --- -- Value is any valid attr-list value for `:help nvim_set_hl` --- -- comments = { italic = true }, --- comments = { italic = true }, --- keywords = {}, --- functions = {}, --- variables = {}, --- -- Background styles. Can be "dark", "transparent" or "normal" --- sidebars = sidebar, -- style for sidebars, see below --- floats = sidebar, -- style for floating windows --- }, --- sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` --- day_brightness = 0.2, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors --- hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. --- dim_inactive = false, -- dims inactive windows --- lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold --- --- --- You can override specific color groups to use other groups or a hex color --- --- function will be called with a ColorScheme table --- -- @param colors ColorScheme --- on_colors = function(colors) --- colors.bg_highlight = hilight --- colors.bg_statusline = colors.none --- end, --- --- --- You can override specific highlights to use other groups or a hex color --- --- function will be called with a Highlights and ColorScheme table --- --@param highlights Highlights --- -- @param colors ColorScheme --- on_highlights = function(highlights, colors) --- highlights.NvimTreeFolderIcon = { --- bg = colors.none, --- fg = "#e0af68", --- } --- highlights.Underlined = { --- underline = false, --- } --- highlights.NvimTreeWinSeparator = { --- fg = colors.border, --- } --- highlights.BufferLineFill = { bg = colors.bg } --- highlights.NvimTreeSpecialFile = { fg = colors.purple, underline = false } --- highlights["@tag.attribute"] = { fg = colors.green1, italic = true } --- -- highlights["@keyword.function"] = { fg = colors.blue, italic = true } --- -- highlights["@function"] = { fg = colors.blue, italic = true } --- end, --- }) diff --git a/lua/user/tokyonight_transparant.lua b/lua/user/tokyonight_transparant.lua deleted file mode 100644 index afeeeed..0000000 --- a/lua/user/tokyonight_transparant.lua +++ /dev/null @@ -1,42 +0,0 @@ --- local status_ok, tokyonight = pcall(require, "tokyonight") --- if not status_ok then --- return --- end --- tokyonight.setup({ --- -- your configuration comes here --- -- or leave it empty to use the default settings --- style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day` --- light_style = "day", -- The theme is used when the background is set to light --- transparent = true, -- Enable this to disable setting the background color --- terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim --- styles = { --- -- Style to be applied to different syntax groups --- -- Value is any valid attr-list value for `:help nvim_set_hl` --- -- comments = { italic = true }, --- comments = { italic = true }, --- keywords = { italic = true }, --- functions = {}, --- variables = {}, --- -- Background styles. Can be "dark", "transparent" or "normal" --- sidebars = "transparent", -- style for sidebars, see below --- floats = "transparent", -- style for floating windows --- }, --- sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` --- day_brightness = 0.2, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors --- hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. --- dim_inactive = false, -- dims inactive windows --- lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold --- --- --- You can override specific color groups to use other groups or a hex color --- --- function will be called with a ColorScheme table --- --@param colors ColorScheme --- on_colors = function(colors) --- colors.bg_highlight = "#9EA0A9" --- end, --- --- --- You can override specific highlights to use other groups or a hex color --- --- function will be called with a Highlights and ColorScheme table --- --@param highlights Highlights --- --@param colors ColorScheme --- --on_highlights = function(highlights, colors) end, --- }) diff --git a/lua/user/utils/whichkey.lua b/lua/user/utils/whichkey.lua index 17988dd..ea6a98b 100644 --- a/lua/user/utils/whichkey.lua +++ b/lua/user/utils/whichkey.lua @@ -87,192 +87,5 @@ function M._CLOSE_ALL_BUFFER() end end -M.mappings = { - -- ["a"] = { "Alpha", "󰕮 Alpha" }, - -- ["e"] = { "NvimTreeToggle", "󰙅 Explorer" }, - -- ["w"] = { "w!", "󰆓 Save" }, - -- ["q"] = { "q!", "󰿅 Quit" }, - -- open exloler and close toggleterm - -- ["o"] = { - -- "lua require('user.utils.whichkey')._OPEN_EXPLORER()", - -- "󱏒 Open Explorer", - -- }, - -- ["h"] = { "nohlsearch", "󱪿 No Highlight" }, - -- ["f"] = { - -- "Telescope find_files ", - -- " Find files", - -- }, - -- ["F"] = { "Telescope live_grep theme=ivy", " Find Text" }, - -- ["F"] = { "Telescope live_grep", " Find Text" }, - -- ["/"] = { - -- function() - -- require("Comment.api").toggle.linewise.current() - -- end, - -- "󰆈 Coment line", - -- }, - -- b = { - -- name = "  Buffers", - -- show all buffers with telescope - -- b = { - -- "lua require('telescope.builtin').buffers(require('telescope.themes').get_dropdown{previewer = false})", - -- "All Buffer", - -- }, - -- close current active buffer - -- c = { "lua require('user.utils.bufferline').bufremove()", "Close current buffer" }, - -- bufferline close left - -- d = { - -- "BufferLineCloseLeft", - -- "Buffer close left", - -- }, - -- bufferline close right - -- D = { - -- "BufferLineCloseRight", - -- "Buffer close right", - -- }, - -- bufferline close others - -- a = { - -- "BufferLineCloseOthers", - -- "Buffer close others", - -- }, - -- close all bufferline - -- A = { - -- "BufferLineCloseOthersbd!", - -- "Buffer close All Buffer", - -- }, - -- }, - - -- g = { - -- name = "  Git", - -- g = { "lua require('user.utils.whichkey')._LAZYGIT_TOGGLE()", "Lazygit" }, - -- j = { "lua require 'gitsigns'.next_hunk()", "Next Hunk" }, - -- k = { "lua require 'gitsigns'.prev_hunk()", "Prev Hunk" }, - -- l = { "lua require 'gitsigns'.blame_line()", "Blame" }, - -- p = { "lua require 'gitsigns'.preview_hunk()", "Preview Hunk" }, - -- r = { "lua require 'gitsigns'.reset_hunk()", "Reset Hunk" }, - -- R = { "lua require 'gitsigns'.reset_buffer()", "Reset Buffer" }, - -- s = { "lua require 'gitsigns'.stage_hunk()", "Stage Hunk" }, - -- u = { - -- "lua require 'gitsigns'.undo_stage_hunk()", - -- "Undo Stage Hunk", - -- }, - -- o = { "Telescope git_status", "Open changed file" }, - -- b = { "Telescope git_branches", "Checkout branch" }, - -- c = { "Telescope git_commits", "Checkout commit" }, - -- d = { - -- "Gitsigns diffthis HEAD", - -- "Diff", - -- }, - -- }, - - -- l = { - -- name = "  LSP", - -- a = { "lua vim.lsp.buf.code_action()", "Code Action" }, - -- d = { - -- "Telescope diagnostics bufnr=0", - -- "Document Diagnostics", - -- }, - -- w = { - -- "Telescope diagnostics", - -- "Workspace Diagnostics", - -- }, - -- f = { "lua vim.lsp.buf.format{async=true}", "Format" }, - -- i = { "LspInfo", "Info" }, - -- I = { "Mason", "Installer Info" }, - -- j = { - -- "lua vim.lsp.diagnostic.goto_next()", - -- "Next Diagnostic", - -- }, - -- k = { - -- "lua vim.lsp.diagnostic.goto_prev()", - -- "Prev Diagnostic", - -- }, - -- l = { "lua vim.lsp.codelens.run()", "CodeLens Action" }, - -- q = { "lua vim.diagnostic.setloclist()", "Quickfix" }, - -- r = { "lua vim.lsp.buf.rename()", "Rename" }, - -- s = { "Telescope lsp_document_symbols", "Document Symbols" }, - -- S = { - -- "Telescope lsp_dynamic_workspace_symbols", - -- "Workspace Symbols", - -- }, - -- }, - -- s = { - -- name = "  Search", - -- b = { "Telescope git_branches", "Checkout branch" }, - -- c = { "Telescope colorscheme", "Colorscheme" }, - -- h = { "Telescope help_tags", "Find Help" }, - -- M = { "Telescope man_pages", "Man Pages" }, - -- r = { "Telescope oldfiles", "Open Recent File" }, - -- R = { "Telescope registers", "Registers" }, - -- k = { "Telescope keymaps", "Keymaps" }, - -- C = { "Telescope commands", "Commands" }, - -- }, - - -- t = { - -- name = "  Terminal", - -- l = { "terminal live-server", "Live Server" }, - -- P = { "lua require('user.utils.whichkey')._NEWTAB_TOGGLE()", "Power Shell" }, - -- x = { "ToggleTermToggleAll!", "Close Tab" }, - -- n = { "lua require('user.utils.whichkey')._NODE_TOGGLE()", "Node" }, - -- b = { "lua require('user.utils.whichkey')._BTOP_TOGGLE()", "Btop" }, - -- p = { "lua require('user.utils.whichkey')._PYTHON_TOGGLE()", "Python" }, - -- f = { "ToggleTerm direction=float", "Float" }, - -- h = { "ToggleTerm size=10 direction=horizontal", "Horizontal" }, - -- v = { "ToggleTerm size=80 direction=vertical", "Vertical" }, - -- s = { "ToggleTerm direction=tab", "New Tab" }, - -- a = { "lua require('user.utils.whichkey')._OPEN_ALACRITTY()", "Open Alacritty" }, - -- w = { "lua require('user.utils.whichkey')._OPEN_WEZTERM()", "Open Wezterm" }, - -- t = { "lua require('user.utils.whichkey')._OPEN_WEZTERM_TAB()", "Open Tab Wezterm" }, - -- j = { "lua _SET_TAB_TITLE()", "Set Tab Title" }, - -- }, - -- r = { - -- name = "  Run", - -- -- l = { "edit term://live-server", "Live Server" }, - -- s = { - -- 'autocmd bufwritepost [^_]*.sass,[^_]*.scss silent exec "!sass %:p %:r.css"', - -- "Auto Compile Sass", - -- }, - -- r = { "RunCode", "Run Code" }, - -- f = { "RunFile", "Run File" }, - -- p = { "RunProject", "Run Project" }, - -- g = { "terminalgradle run", "Run Gradle" }, - -- m = { - -- "terminal mvn package", - -- "MVN Build", - -- }, - -- }, - -- z = { - -- name = " 󱑠 Plugins(Lazy)", - -- i = { "Lazy install", "Install" }, - -- s = { "Lazy sync", "Sync" }, - -- S = { "Lazy clear", "Status" }, - -- c = { "Lazy clean", "Clean" }, - -- u = { "Lazy update", "Update" }, - -- p = { "Lazy profile", "Profile" }, - -- l = { "Lazy log", "Log" }, - -- d = { "Lazy debug", "Debug" }, - -- }, -} - --- if pcode.codeium then --- table.insert(M.mappings, { ["c"] = { ":call codeium#Chat()", "󰭹 Codeium Chat" } }) --- end - --- if pcode.database then --- table.insert(M.mappings, { --- ["D"] = { --- name = " 󰆼 DBUI", --- -- d = { "NvimTreeClosetabnewDBUI", "󰆼 DBUI Open" }, --- d = { "AlphaNvimTreeCloseDBUI", "󰆼 DBUI Open" }, --- q = { --- "DBUICloseBufferLineCloseOthersbd!lua require('user.utils.bufferline').bufremove()Alpha", --- "󰅙 DBUI Close", --- }, --- }, --- }) --- end - --- M.mappings2 = { --- ["/"] = { "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", " 󰆈 Commet Block" }, --- } - +M.mappings = {} return M