diff --git a/lua/_vscode/mappings.lua b/lua/_vscode/mappings.lua index 4b6f0cf..15817d3 100644 --- a/lua/_vscode/mappings.lua +++ b/lua/_vscode/mappings.lua @@ -31,9 +31,11 @@ Map("n", "zy", Toggle_breakpoint) Map("n", "yr", Copy_relative_path) Map("n", "yR", Copy_path) Map({ "n", "i", "v", "x" }, "", Select_all) -Map({ "n", "v", "x" }, "y", Copy_clipboard) -Map({ "n", "v", "x" }, "p", Paste_clipboard) -Map({ "n", "v", "x" }, "", Save) +Map({ "n", "v", "x", "i" }, "y", Copy_clipboard) +Map({ "n", "v", "x", "i" }, "", Copy_clipboard) +Map({ "n", "v", "x", "i" }, "p", Paste_clipboard) +Map({ "n", "v", "x", "i" }, "", Paste_clipboard) +Map({ "n", "v", "x", "i" }, "", Save) Map({ "n" }, "q", Close) Map("v", "gs", Codesnap) diff --git a/lua/pcode/plugins/_lsp.lua b/lua/pcode/plugins/_lsp.lua index 1dc2e4e..8f1262b 100644 --- a/lua/pcode/plugins/_lsp.lua +++ b/lua/pcode/plugins/_lsp.lua @@ -1,7 +1,7 @@ return { { "williamboman/mason-lspconfig.nvim", - event = { "VeryLazy", "BufReadPre", "BufNewFile", "BufRead" }, + event = { "CmdlineEnter", "BufReadPre", "BufNewFile", "BufRead" }, dependencies = { { "pojokcodeid/auto-lsp.nvim", lazy = true }, { diff --git a/lua/pcode/plugins/_treesitterautotag.lua b/lua/pcode/plugins/_treesitterautotag.lua index 319c45c..725cbd8 100644 --- a/lua/pcode/plugins/_treesitterautotag.lua +++ b/lua/pcode/plugins/_treesitterautotag.lua @@ -1,6 +1,6 @@ return { - "windwp/nvim-ts-autotag", - lazy = true, - event = { "BufRead", "VeryLazy" }, - opts = {}, + "windwp/nvim-ts-autotag", + lazy = true, + event = { "BufRead", "InsertEnter" }, + opts = {}, } diff --git a/lua/pcode/plugins/cmpcmdline.lua b/lua/pcode/plugins/cmpcmdline.lua index b36bed8..1267c83 100644 --- a/lua/pcode/plugins/cmpcmdline.lua +++ b/lua/pcode/plugins/cmpcmdline.lua @@ -91,7 +91,8 @@ return { }, { "hrsh7th/cmp-cmdline", - event = "VeryLazy", + -- event = "VeryLazy", + event = "CmdlineEnter", config = function() local cmp = require("cmp") local mapping = { diff --git a/lua/pcode/plugins/comment.lua b/lua/pcode/plugins/comment.lua index d694d92..36a731d 100644 --- a/lua/pcode/plugins/comment.lua +++ b/lua/pcode/plugins/comment.lua @@ -1,29 +1,29 @@ return { - "numToStr/Comment.nvim", - event = "VeryLazy", - dependencies = { - "JoosepAlviste/nvim-ts-context-commentstring", - }, - opts = function() - return { - pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), - } - end, - keys = { - { - "/", - "(comment_toggle_linewise_current)", - desc = "󰆈 Coment line", - mode = "n", - }, - { - "/", - "(comment_toggle_linewise_visual)", - desc = "󰆈 Coment line", - mode = "v", - }, - }, - config = function(_, opts) - require("Comment").setup(opts) - end, + "numToStr/Comment.nvim", + event = "VeryLazy", + dependencies = { + "JoosepAlviste/nvim-ts-context-commentstring", + }, + opts = function() + return { + pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), + } + end, + keys = { + { + "/", + "(comment_toggle_linewise_current)", + desc = "󰆈 Coment line", + mode = "n", + }, + { + "/", + "(comment_toggle_linewise_visual)", + desc = "󰆈 Coment line", + mode = "v", + }, + }, + config = function(_, opts) + require("Comment").setup(opts) + end, } diff --git a/lua/pcode/plugins/extras/codeiumnvim.lua b/lua/pcode/plugins/extras/codeiumnvim.lua index 0070991..7d91c9c 100644 --- a/lua/pcode/plugins/extras/codeiumnvim.lua +++ b/lua/pcode/plugins/extras/codeiumnvim.lua @@ -2,16 +2,28 @@ return { -- codeium cmp source { "nvim-cmp", + event = "BufReadPre", dependencies = { -- codeium { - "Exafunction/codeium.nvim", + "Exafunction/windsurf.nvim", cmd = "Codeium", - enabled = false, - build = ":Codeium Auth", + enabled = true, opts = { enable_chat = true, + enable_cmp_source = true, + virtual_text = { + enabled = true, + key_bindings = { + accept = "", + next = "", + prev = "", + }, + }, }, + config = function(_, opts) + require("codeium").setup(opts) + end, }, }, --@param opts cmp.ConfigSchema diff --git a/lua/pcode/plugins/extras/illuminate.lua b/lua/pcode/plugins/extras/illuminate.lua index 6efd303..84f3a55 100644 --- a/lua/pcode/plugins/extras/illuminate.lua +++ b/lua/pcode/plugins/extras/illuminate.lua @@ -1,6 +1,6 @@ local M = { "RRethy/vim-illuminate", - event = "VeryLazy", + event = "BufRead", } M.opts = { diff --git a/lua/pcode/plugins/extras/navic.lua b/lua/pcode/plugins/extras/navic.lua index eb1a1da..efc47db 100644 --- a/lua/pcode/plugins/extras/navic.lua +++ b/lua/pcode/plugins/extras/navic.lua @@ -1,6 +1,6 @@ local M = { "SmiteshP/nvim-navic", - event = "VeryLazy", + event = "BufRead", dependencies = { "LunarVim/breadcrumbs.nvim", opts = {}, diff --git a/lua/pcode/plugins/extras/neocodeium.lua b/lua/pcode/plugins/extras/neocodeium.lua new file mode 100644 index 0000000..1dc4190 --- /dev/null +++ b/lua/pcode/plugins/extras/neocodeium.lua @@ -0,0 +1,72 @@ +return { + "monkoose/neocodeium", + event = "VeryLazy", + config = function() + local uv = vim.uv + local fn = vim.fn + local pummenu_timer = assert(uv.new_timer()) + local cmp = require("cmp") + local neocodeium = require("neocodeium") + local renderer = require("neocodeium.renderer") + local completer = require("neocodeium.completer") + local function is_noselect() + local completeopt = vim.o.completeopt + return completeopt:find("noselect") and -1 or 0 + end + + local default_selected_compl = is_noselect() + local selected_compl = default_selected_compl + + -- if cmp menu_opened then neocodeium clear + cmp.event:on("menu_opened", function() + neocodeium.clear() + end) + neocodeium.setup({ + filter = function() + return not cmp.visible() + end, + }) + + -- if cmp menu_is_closed then neocodeium activate + cmp.event:on("menu_closed", function() + local cur_selected = fn.complete_info({ "selected" }).selected + if selected_compl == cur_selected then + completer:initiate() + else + selected_compl = cur_selected + completer:clear(true) + renderer:display_label() + pummenu_timer:stop() + pummenu_timer:start( + 400, + 0, + vim.schedule_wrap(function() + if fn.pumvisible() == 1 then + completer:initiate() + end + end) + ) + end + end) + vim.keymap.set("i", "", function() + neocodeium.accept() + end) + vim.keymap.set("i", "", function() + neocodeium.cycle() + end) + vim.keymap.set("i", "", function() + require("neocodeium").cycle(-1) + end) + vim.keymap.set("i", "", function() + require("neocodeium").clear() + end) + -- create user command CodeiumDiasable + vim.api.nvim_create_user_command("CodeiumDisable", function() + require("neocodeium.commands").disable(true) + end, {}) + -- create user command CodeiumEnable + vim.api.nvim_create_user_command("CodeiumEnable", function() + require("neocodeium.commands").enable() + end, {}) + end, +} diff --git a/lua/pcode/plugins/extras/showkeys.lua b/lua/pcode/plugins/extras/showkeys.lua new file mode 100644 index 0000000..00bb89a --- /dev/null +++ b/lua/pcode/plugins/extras/showkeys.lua @@ -0,0 +1 @@ +return { "nvzone/showkeys", cmd = "ShowkeysToggle" } diff --git a/lua/pcode/plugins/indentblakline.lua b/lua/pcode/plugins/indentblakline.lua index aa2d800..2d76ff1 100644 --- a/lua/pcode/plugins/indentblakline.lua +++ b/lua/pcode/plugins/indentblakline.lua @@ -1,5 +1,5 @@ return { - "lukas-reineke/indent-blankline.nvim", + --[[ "lukas-reineke/indent-blankline.nvim", -- version = "3.5.4", event = { "BufRead", "InsertEnter", "BufNewFile" }, lazy = true, @@ -35,5 +35,5 @@ return { }, }, }, - main = "ibl", + main = "ibl", ]] } diff --git a/lua/pcode/plugins/indentline.lua b/lua/pcode/plugins/indentline.lua new file mode 100644 index 0000000..909d0a6 --- /dev/null +++ b/lua/pcode/plugins/indentline.lua @@ -0,0 +1,22 @@ +return { + "shellRaining/hlchunk.nvim", + event = { "BufReadPre", "BufNewFile" }, + config = function() + require("hlchunk").setup({ + chunk = { + enable = true, + -- ... + }, + indent = { + enable = true, + -- ... + }, + exclude_filetypes = { + aerial = true, + dashboard = true, + alpha = true, + -- some other filetypes + }, + }) + end, +} diff --git a/lua/pcode/plugins/lang/kotlin_backup.lua b/lua/pcode/plugins/lang/kotlin_backup.lua new file mode 100644 index 0000000..fe17637 --- /dev/null +++ b/lua/pcode/plugins/lang/kotlin_backup.lua @@ -0,0 +1,149 @@ +return { + -- install treesitter + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "kotlin" }) + end, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "kotlin_language_server" }) + end, + }, + { + "pojokcodeid/auto-conform.nvim", + event = "VeryLazy", + opts = function(_, opts) + opts.formatters_by_ft = opts.formatters_by_ft or {} + local package = "ktfmt" + vim.list_extend(opts.ensure_installed, { package }) + opts.formatters_by_ft.kotlin = { package } + end, + }, + { + "pojokcodeid/auto-lint.nvim", + optional = true, + opts = function(_, opts) + opts.linters_by_ft = opts.linters_by_ft or {} + vim.list_extend(opts.ensure_installed, { "ktlint" }) + opts.linters_by_ft.kotlin = { "ktlint" } + end, + }, + { + "mason.nvim", + opts = { + ensure_installed = { "kotlin-debug-adapter" }, + }, + }, + { + "rcarriga/nvim-dap-ui", + lazy = true, + event = "BufRead", + dependencies = { + { "mfussenegger/nvim-dap", lazy = true }, + { "nvim-neotest/nvim-nio", lazy = true }, + }, + opts = function() + require("pcode.user.dapui") + local dap = require("dap") + if not dap.adapters.kotlin then + dap.adapters.kotlin = { + type = "executable", + command = "kotlin-debug-adapter", + options = { auto_continue_if_many_stopped = false }, + } + end + + dap.configurations.kotlin = { + { + type = "kotlin", + request = "launch", + name = "This file", + -- may differ, when in doubt, whatever your project structure may be, + -- it has to correspond to the class file located at `build/classes/` + -- and of course you have to build before you debug + mainClass = function() + local root = vim.uv.cwd() + local fname = vim.api.nvim_buf_get_name(0) + fname = fname:gsub(root, "") + fname = fname:gsub("/app/src/main/kotlin/", "") + fname = fname:gsub(".kt", "Kt"):gsub("/", ".") + -- src/main/kotlin/websearch/Main.kt -> websearch.MainKt + return fname + end, + projectRoot = "${workspaceFolder}", + jsonLogFile = "", + enableJsonLogging = false, + }, + { + -- Use this for unit tests + -- First, run + -- ./gradlew --info cleanTest test --debug-jvm + -- then attach the debugger to it + type = "kotlin", + request = "attach", + name = "Attach to debugging session", + port = 5005, + args = {}, + projectRoot = vim.fn.getcwd, + hostName = "localhost", + timeout = 2000, + }, + } + end, + keys = { + { "d", "", desc = "  Debug" }, + { "dt", "lua require'dap'.toggle_breakpoint()", desc = "Toggle Breakpoint" }, + { "db", "lua require'dap'.step_back()", desc = "Step Back" }, + { "dc", "lua require'dap'.continue()", desc = "Continue" }, + { "dC", "lua require'dap'.run_to_cursor()", desc = "Run To Cursor" }, + { "dd", "lua require'dap'.disconnect()", desc = "Disconnect" }, + { "dg", "lua require'dap'.session()", desc = "Get Session" }, + { "di", "lua require'dap'.step_into()", desc = "Step Into" }, + { "do", "lua require'dap'.step_over()", desc = "Step Over" }, + { "du", "lua require'dap'.step_out()", desc = "Step Out" }, + { "dp", "lua require'dap'.pause()", desc = "Pause" }, + { "dr", "lua require'dap'.repl.toggle()", desc = "Toggle Repl" }, + { "ds", "lua require'dap'.continue()", desc = "Start" }, + { "dq", "lua require'dap'.close()", desc = "Quit" }, + { "dU", "lua require'dapui'.toggle({reset = true})", desc = "Toggle UI" }, + -- setting cek + -- https://stackoverflow.com/questions/9356543/logging-while-testing-through-gradle + { "T", "", desc = " Test" }, + { "Ta", "terminal gradle test", desc = "Run All" }, + { + "Tu", + function() + local function get_default_package() + local path = vim.fn.expand("%:p:h") + local project_root = vim.fn.getcwd() + local relative_path = path:sub(#project_root + 1) + relative_path = relative_path:gsub("app\\src\\test\\kotlin\\", "") + relative_path = relative_path:gsub("app/src/test/kotlin/", "") + relative_path = relative_path:gsub("\\", ".") + relative_path = relative_path:gsub("/", ".") + return relative_path:sub(2) + end + local curr_file = vim.fn.expand("%:t") + curr_file = curr_file:gsub("kt", "") + local current_word = "" + local input = vim.fn.getline(".") + current_word = all_trim((input:gsub("class", "")):gsub("{", "")) -- hilangkan bagian class + current_word = current_word:gsub("fun", "") + current_word = current_word:gsub("%(%)", "") + current_word = current_word:gsub("{", "") + current_word = current_word:gsub("@Test", "") + vim.cmd( + "terminal gradle test --tests " .. get_default_package() .. "." .. curr_file .. all_trim(current_word) + ) + end, + desc = "Run Under Cursor", + }, + { "rg", "terminalgradle run", desc = "Run Gradle", mode = "n" }, + }, + }, +} diff --git a/lua/pcode/plugins/lspsignature.lua b/lua/pcode/plugins/lspsignature.lua new file mode 100644 index 0000000..209dd7d --- /dev/null +++ b/lua/pcode/plugins/lspsignature.lua @@ -0,0 +1,13 @@ +return { + "ray-x/lsp_signature.nvim", + event = "InsertEnter", + opts = { + bind = true, + handler_opts = { + border = "rounded", + }, + hint_prefix = "󰍩 ", + }, + -- or use config + -- config = function(_, opts) require'lsp_signature'.setup({you options}) end +} diff --git a/lua/pcode/plugins/nvimlint.lua b/lua/pcode/plugins/nvimlint.lua index af8b8a2..ddf894d 100644 --- a/lua/pcode/plugins/nvimlint.lua +++ b/lua/pcode/plugins/nvimlint.lua @@ -1,18 +1,17 @@ return { - "pojokcodeid/auto-lint.nvim", - dependencies = { - "mfussenegger/nvim-lint", - event = "VeryLazy", - }, - event = "VeryLazy", - opts = function(_, opts) - opts.map_lang = opts.map_lang or {} - opts.map_name = opts.map_name or {} - opts.add_new = opts.add_new or {} - opts.ignore = opts.ignore or {} - opts.ensure_installed = opts.ensure_installed or {} - end, - config = function(_, opts) - require("auto-lint").setup(opts) - end, + "pojokcodeid/auto-lint.nvim", + dependencies = { + "mfussenegger/nvim-lint", + }, + event = "BufRead", + opts = function(_, opts) + opts.map_lang = opts.map_lang or {} + opts.map_name = opts.map_name or {} + opts.add_new = opts.add_new or {} + opts.ignore = opts.ignore or {} + opts.ensure_installed = opts.ensure_installed or {} + end, + config = function(_, opts) + require("auto-lint").setup(opts) + end, } diff --git a/lua/pcode/plugins/whichkey.lua b/lua/pcode/plugins/whichkey.lua index 283e086..244600f 100644 --- a/lua/pcode/plugins/whichkey.lua +++ b/lua/pcode/plugins/whichkey.lua @@ -1,74 +1,74 @@ return { - "folke/which-key.nvim", - lazy = true, - keys = { "", '"', "'", "`", "c", "v" }, - event = "VeryLazy", - opts = function() - return { - plugins = { - marks = true, - registers = true, - spelling = { - enabled = true, - suggestions = 20, - }, - presets = { - operators = false, - motions = false, - text_objects = false, - windows = false, - nav = false, - z = false, - g = false, - }, - }, - icons = { - mappings = false, - }, - win = { - row = -1, - border = "rounded", -- none, single, double, shadow - padding = { 1, 2 }, -- extra window padding [top/bottom, right/left] - title = true, - title_pos = "center", - zindex = 1000, - bo = {}, - wo = {}, - }, - layout = { - height = { min = 4, max = 25 }, -- min and max height of the columns - width = { min = 20, max = 50 }, -- min and max width of the columns - spacing = 3, -- spacing between columns - align = "left", -- align columns left, center or right - }, - 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 - -- Disabled by default for Telescope - disable = { - buftypes = {}, - filetypes = { "TelescopePrompt" }, - }, - ---@type false | "classic" | "modern" | "helix" - preset = "classic", - mappings = { - { "S", "", desc = " 󱑠 Plugins(Lazy)", mode = "n" }, - { "Si", "Lazy install", desc = "Install", mode = "n" }, - { "Ss", "Lazy sync", desc = "Sync", mode = "n" }, - { "SS", "Lazy clear", desc = "Status", mode = "n" }, - { "Sc", "Lazy clean", desc = "Clean", mode = "n" }, - { "Su", "Lazy update", desc = "Update", mode = "n" }, - { "Sp", "Lazy profile", desc = "Profile", mode = "n" }, - { "Sl", "Lazy log", desc = "Log", mode = "n" }, - { "Sd", "Lazy debug", desc = "Debug", mode = "n" }, - { "w", "w!", desc = "󰆓 Save", mode = "n" }, - { "q", "q!", desc = "󰿅 Quit", mode = "n" }, - { "h", "nohlsearch", desc = "󱪿 No Highlight", mode = "n" }, - }, - } - end, - config = function(_, opts) - local which_key = require("which-key") - which_key.setup(opts) - which_key.add(opts.mappings) - end, + "folke/which-key.nvim", + lazy = true, + keys = { "", '"', "'", "`", "c", "v" }, + event = "VeryLazy", + opts = function() + return { + plugins = { + marks = true, + registers = true, + spelling = { + enabled = true, + suggestions = 20, + }, + presets = { + operators = false, + motions = false, + text_objects = false, + windows = false, + nav = false, + z = false, + g = false, + }, + }, + icons = { + mappings = false, + }, + win = { + row = -1, + border = "rounded", -- none, single, double, shadow + padding = { 1, 2 }, -- extra window padding [top/bottom, right/left] + title = true, + title_pos = "center", + zindex = 1000, + bo = {}, + wo = {}, + }, + layout = { + height = { min = 4, max = 25 }, -- min and max height of the columns + width = { min = 20, max = 50 }, -- min and max width of the columns + spacing = 3, -- spacing between columns + align = "left", -- align columns left, center or right + }, + 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 + -- Disabled by default for Telescope + disable = { + buftypes = {}, + filetypes = { "TelescopePrompt" }, + }, + ---@type false | "classic" | "modern" | "helix" + preset = "modern", + mappings = { + { "S", "", desc = " 󱑠 Plugins(Lazy)", mode = "n" }, + { "Si", "Lazy install", desc = "Install", mode = "n" }, + { "Ss", "Lazy sync", desc = "Sync", mode = "n" }, + { "SS", "Lazy clear", desc = "Status", mode = "n" }, + { "Sc", "Lazy clean", desc = "Clean", mode = "n" }, + { "Su", "Lazy update", desc = "Update", mode = "n" }, + { "Sp", "Lazy profile", desc = "Profile", mode = "n" }, + { "Sl", "Lazy log", desc = "Log", mode = "n" }, + { "Sd", "Lazy debug", desc = "Debug", mode = "n" }, + { "w", "w!", desc = "󰆓 Save", mode = "n" }, + { "q", "q!", desc = "󰿅 Quit", mode = "n" }, + { "h", "nohlsearch", desc = "󱪿 No Highlight", mode = "n" }, + }, + } + end, + config = function(_, opts) + local which_key = require("which-key") + which_key.setup(opts) + which_key.add(opts.mappings) + end, } diff --git a/lua/pcode/user/custom.lua b/lua/pcode/user/custom.lua index d370589..a2592bc 100644 --- a/lua/pcode/user/custom.lua +++ b/lua/pcode/user/custom.lua @@ -18,7 +18,7 @@ return { opts = { -- for more options check out https://github.com/pojokcodeid/auto-lualine.nvim setColor = "auto", - setOption = "roundedall", + setOption = "parallelogram", setMode = 5, }, }, @@ -40,7 +40,7 @@ return { -- install mason (lsp, dap, linters, formatters) { "williamboman/mason.nvim", - opts = { ensure_installed = { "stylua" } }, + -- opts = { ensure_installed = { "stylua" } }, }, -- overide lsp config { @@ -102,44 +102,44 @@ return { end, }, -- custem nvimtree - { - "nvim-tree/nvim-tree.lua", - opts = function(_, opts) - -- set nvimtree float view (default left side) - -- opts.view = { - -- adaptive_size = false, - -- centralize_selection = true, - -- side = "left", - -- preserve_window_proportions = false, - -- number = false, - -- relativenumber = false, - -- signcolumn = "yes", - -- float = { - -- enable = true, - -- open_win_config = function() - -- local screen_w = vim.opt.columns:get() - -- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get() - -- local window_w = screen_w * 0.5 - -- local window_h = screen_h * 0.9 - -- local window_w_int = math.floor(window_w) - -- local window_h_int = math.floor(window_h) - -- local center_x = (screen_w - window_w) / 2 - -- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get() - -- return { - -- border = "rounded", - -- relative = "editor", - -- row = center_y, - -- col = center_x, - -- width = window_w_int, - -- height = window_h_int, - -- } - -- end, - -- }, - -- width = function() - -- return math.floor(vim.opt.columns:get() * 0.5) - -- end, - -- } - return opts - end, - }, + -- { + -- "nvim-tree/nvim-tree.lua", + -- opts = function(_, opts) + -- set nvimtree float view (default left side) + -- opts.view = { + -- adaptive_size = false, + -- centralize_selection = true, + -- side = "left", + -- preserve_window_proportions = false, + -- number = false, + -- relativenumber = false, + -- signcolumn = "yes", + -- float = { + -- enable = true, + -- open_win_config = function() + -- local screen_w = vim.opt.columns:get() + -- local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get() + -- local window_w = screen_w * 0.5 + -- local window_h = screen_h * 0.9 + -- local window_w_int = math.floor(window_w) + -- local window_h_int = math.floor(window_h) + -- local center_x = (screen_w - window_w) / 2 + -- local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get() + -- return { + -- border = "rounded", + -- relative = "editor", + -- row = center_y, + -- col = center_x, + -- width = window_w_int, + -- height = window_h_int, + -- } + -- end, + -- }, + -- width = function() + -- return math.floor(vim.opt.columns:get() * 0.5) + -- end, + -- } + -- return opts + -- end, + -- }, } diff --git a/lua/pcode/user/icons.lua b/lua/pcode/user/icons.lua index 50e7964..e0389db 100644 --- a/lua/pcode/user/icons.lua +++ b/lua/pcode/user/icons.lua @@ -2,7 +2,8 @@ return { kind = { Boolean = "󰨙", Color = "", - Codeium = "󰘦", + -- Codeium = "󰘦", + Codeium = "󰁨", Control = "", Collapsed = " ", Component = "󰅴", @@ -43,6 +44,57 @@ return { Operator = "", TypeParameter = "", }, + kind2 = { + Array = "  ", + Boolean = " 󰨙 ", + Class = " 󰯳 ", + Codeium = " 󰘦 ", + Color = " 󰰠 ", + Control = "  ", + Collapsed = " > ", + -- Constant = " 󰯱 ", + Constant = " 󰯲 ", + Constructor = "  ", + Copilot = "  ", + Enum = " 󰯹 ", + EnumMember = "  ", + Event = "  ", + Field = "  ", + File = "  ", + Folder = "  ", + -- Function = " 󰡱 ", + Function = " 󰯼 ", + Interface = " 󰰅 ", + Key = "  ", + -- Keyword = " 󱕴 ", + Keyword = "  ", + Method = " 󰰑 ", + -- Module = " 󰆼 ", + Module = " 󰰐 ", + Namespace = " 󰰔 ", + Null = "  ", + Number = " 󰰔 ", + Object = " 󰲟 ", + Operator = "  ", + Package = " 󰰚 ", + Property = " 󰲽 ", + Reference = " 󰰠 ", + -- Snippet = "  ", + -- Snippet = "  ", + Snippet = " 󰰢 ", + String = "  ", + Struct = " 󰰣 ", + TabNine = " 󰏚 ", + -- Text = " 󱜥 ", + -- Text = "  ", + Text = " 󰰥 ", + TypeParameter = " 󰰦 ", + Unit = " 󱜥 ", + Value = "  ", + -- Variable = " 󰫧 ", + Variable = "  ", + -- Variable = " 󰰬 ", + }, git = { LineAdded = "", LineModified = "", diff --git a/lua/pcode/user/options.lua b/lua/pcode/user/options.lua index 19d30d8..fb63c97 100644 --- a/lua/pcode/user/options.lua +++ b/lua/pcode/user/options.lua @@ -71,3 +71,11 @@ vim.api.nvim_create_autocmd("FileType", { }) vim.opt.guicursor = "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20" + +local uname = vim.loop.os_uname() +if uname.sysname == "Windows_NT" then + vim.opt.shell = "pwsh" + vim.opt.shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command" + vim.opt.shellquote = "" + vim.opt.shellxquote = "" +end