diff --git a/lua/user/gitsigns.lua b/lua/user/gitsigns.lua index 744ecc7..4878218 100644 --- a/lua/user/gitsigns.lua +++ b/lua/user/gitsigns.lua @@ -1,48 +1,70 @@ local status_ok, gitsigns = pcall(require, "gitsigns") if not status_ok then - return + return end +local icons = require("user.icons") -gitsigns.setup { - signs = { - add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, - change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, - delete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - topdelete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - changedelete = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, - }, - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - watch_gitdir = { - interval = 1000, - follow_files = true, - }, - attach_to_untracked = true, - current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, - current_line_blame_formatter_opts = { - relative_time = false, - }, - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, - preview_config = { - -- Options passed to nvim_open_win - border = "single", - style = "minimal", - relative = "cursor", - row = 0, - col = 1, - }, - yadm = { - enable = false, - }, -} +gitsigns.setup({ + signs = { + add = { + hl = "GitSignsAdd", + text = icons.ui.BoldLineLeft, + numhl = "GitSignsAddNr", + linehl = "GitSignsAddLn", + }, + change = { + hl = "GitSignsChange", + text = icons.ui.BoldLineLeft, + numhl = "GitSignsChangeNr", + linehl = "GitSignsChangeLn", + }, + delete = { + hl = "GitSignsDelete", + text = icons.ui.Triangle, + numhl = "GitSignsDeleteNr", + linehl = "GitSignsDeleteLn", + }, + topdelete = { + hl = "GitSignsDelete", + text = icons.ui.Triangle, + numhl = "GitSignsDeleteNr", + linehl = "GitSignsDeleteLn", + }, + changedelete = { + hl = "GitSignsChange", + text = icons.ui.BoldLineLeft, + numhl = "GitSignsChangeNr", + linehl = "GitSignsChangeLn", + }, + }, + signcolumn = true, + numhl = false, + linehl = false, + word_diff = false, + watch_gitdir = { + interval = 1000, + follow_files = true, + }, + attach_to_untracked = true, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter = ", - ", + sign_priority = 6, + status_formatter = nil, -- Use default + update_debounce = 200, + max_file_length = 40000, + preview_config = { + -- Options passed to nvim_open_win + border = "rounded", + style = "minimal", + relative = "cursor", + row = 0, + col = 1, + }, + yadm = { enable = false }, +}) diff --git a/lua/user/icons.lua b/lua/user/icons.lua index 26ec403..4b26094 100644 --- a/lua/user/icons.lua +++ b/lua/user/icons.lua @@ -69,18 +69,17 @@ return { Bug = "", Stacks = "", Scopes = "", - Watches = "", + Watches = "󰂥", DebugConsole = "", Calendar = "", Check = "", - ChevronRight = ">", - ChevronShortDown = "", - ChevronShortLeft = "", - ChevronShortRight = "", - ChevronShortUp = "", - Circle = "", - Dot = "", - Close = "", + ChevronRight = "", + ChevronShortDown = "", + ChevronShortLeft = "", + ChevronShortRight = "", + ChevronShortUp = "", + Circle = " ", + Close = "󰅖", CloudDownload = "", Code = "", Comment = "", @@ -96,10 +95,10 @@ return { File = "", FileSymlink = "", Files = "", - FindFile = "", - FindText = "", + FindFile = "󰈞", + FindText = "󰊄", Fire = "", - -- Folder = "", + -- Folder = "󰉋", -- FolderOpen = "", Folder = "󰉋", FolderOpen = "󰝰", @@ -121,13 +120,13 @@ return { Search = "", SignIn = "", SignOut = "", - Tab = "", + Tab = "󰌒", Table = "", - Target = "", + Target = "󰀘", Telescope = "", Text = "", Tree = "", - Triangle = "▸", + Triangle = "󰐊", TriangleShortArrowDown = "", TriangleShortArrowLeft = "", TriangleShortArrowRight = "", @@ -149,7 +148,7 @@ return { Trace = "✎", }, misc = { - Robot = "ﮧ", + Robot = "󰚩", Squirrel = "", Tag = "", Watch = "", diff --git a/lua/user/icons_backup.lua b/lua/user/icons_backup.lua new file mode 100644 index 0000000..c2c523e --- /dev/null +++ b/lua/user/icons_backup.lua @@ -0,0 +1,160 @@ +return { + kind = { + Array = "", + Boolean = "", + Class = "", + Color = "", + Constant = "", + Constructor = "", + Enum = "", + EnumMember = "", + Event = "", + Field = "", + File = "", + Folder = "󰉋", + Function = "", + Interface = "", + Key = "", + Keyword = "", + Method = "", + Module = "", + Namespace = "", + Null = "󰟢", + Number = "", + Object = "", + Operator = "", + Package = "", + Property = "", + Reference = "", + Snippet = "", + String = "", + Struct = "", + Text = "", + TypeParameter = "", + Unit = "", + Value = "", + Variable = "", + }, + git = { + LineAdded = "", + LineModified = "", + LineRemoved = "", + FileDeleted = "", + FileIgnored = "◌", + FileRenamed = "", + FileStaged = "S", + FileUnmerged = "", + FileUnstaged = "", + FileUntracked = "U", + Diff = "", + Repo = "", + Octoface = "", + Branch = "", + }, + ui = { + ArrowCircleDown = "", + ArrowCircleLeft = "", + ArrowCircleRight = "", + ArrowCircleUp = "", + BoldArrowDown = "", + BoldArrowLeft = "", + BoldArrowRight = "", + BoldArrowUp = "", + BoldClose = "", + BoldDividerLeft = "", + BoldDividerRight = "", + BoldLineLeft = "▎", + BookMark = "", + BoxChecked = "", + Bug = "", + Stacks = "", + Scopes = "", + Watches = "", + DebugConsole = "", + Calendar = "", + Check = "", + ChevronRight = ">", + ChevronShortDown = "", + ChevronShortLeft = "", + ChevronShortRight = "", + ChevronShortUp = "", + Circle = "", + Dot = "", + Close = "", + CloudDownload = "", + Code = "", + Comment = "", + Dashboard = "", + DividerLeft = "", + DividerRight = "", + DoubleChevronRight = "»", + Ellipsis = "", + -- EmptyFolder = "", + -- EmptyFolderOpen = "", + EmptyFolder = "󰉖", + EmptyFolderOpen = "󰷏", + File = "", + FileSymlink = "", + Files = "", + FindFile = "", + FindText = "", + Fire = "", + -- Folder = "", + -- FolderOpen = "", + Folder = "󰉋", + FolderOpen = "󰝰", + FolderSymlink = "", + Forward = "", + Gear = "", + History = "", + Lightbulb = "", + LineLeft = "▏", + LineMiddle = "│", + List = "", + Lock = "", + NewFile = "", + Note = "", + Package = "", + Pencil = "󰏫", + Plus = "", + Project = "", + Search = "", + SignIn = "", + SignOut = "", + Tab = "", + Table = "", + Target = "", + Telescope = "", + Text = "", + Tree = "", + Triangle = "▸", + TriangleShortArrowDown = "", + TriangleShortArrowLeft = "", + TriangleShortArrowRight = "", + TriangleShortArrowUp = "", + Neovim = "", + }, + diagnostics = { + BoldError = "", + Error = "", + BoldWarning = "", + Warning = "", + BoldInformation = "", + Information = "", + BoldQuestion = "", + Question = "", + BoldHint = "", + Hint = "󰌶", + Debug = "", + Trace = "✎", + }, + misc = { + Robot = "ﮧ", + Squirrel = "", + Tag = "", + Watch = "", + Smiley = "", + Package = "", + CircuitBoard = "", + }, +} diff --git a/lua/user/nvim-tree.lua b/lua/user/nvim-tree.lua index 79681b3..41fca6a 100644 --- a/lua/user/nvim-tree.lua +++ b/lua/user/nvim-tree.lua @@ -10,15 +10,131 @@ end local icons = require("user.icons") nvim_tree.setup({ + auto_reload_on_write = false, + disable_netrw = false, + hijack_cursor = false, + hijack_netrw = true, + hijack_unnamed_buffer_when_opening = false, + sort_by = "name", + root_dirs = {}, + prefer_startup_root = false, + sync_root_with_cwd = true, + reload_on_bufenter = false, + respect_buf_cwd = false, + on_attach = "default", + select_prompts = false, + view = { + adaptive_size = false, + centralize_selection = true, + width = 30, + side = "left", + preserve_window_proportions = false, + number = false, + relativenumber = false, + signcolumn = "yes", + float = { + enable = false, + quit_on_focus_loss = true, + open_win_config = { + relative = "editor", + border = "rounded", + width = 30, + height = 30, + row = 1, + col = 1, + }, + }, + }, + renderer = { + add_trailing = false, + group_empty = false, + highlight_git = true, + full_name = false, + highlight_opened_files = "none", + -- root_folder_label = ":t", + root_folder_label = false, + indent_width = 2, + indent_markers = { + enable = false, + inline_arrows = true, + icons = { + corner = "└", + edge = "│", + item = "│", + none = " ", + }, + }, + icons = { + webdev_colors = true, + git_placement = "before", + padding = " ", + symlink_arrow = " ➛ ", + show = { + file = true, + folder = true, + folder_arrow = true, + git = true, + }, + glyphs = { + default = icons.ui.Text, + symlink = icons.ui.FileSymlink, + bookmark = icons.ui.BookMark, + folder = { + arrow_closed = icons.ui.TriangleShortArrowRight, + arrow_open = icons.ui.TriangleShortArrowDown, + default = icons.ui.Folder, + open = icons.ui.FolderOpen, + empty = icons.ui.EmptyFolder, + empty_open = icons.ui.EmptyFolderOpen, + symlink = icons.ui.FolderSymlink, + symlink_open = icons.ui.FolderOpen, + }, + git = { + unstaged = icons.git.FileUnstaged, + staged = icons.git.FileStaged, + unmerged = icons.git.FileUnmerged, + renamed = icons.git.FileRenamed, + untracked = icons.git.FileUntracked, + deleted = icons.git.FileDeleted, + ignored = icons.git.FileIgnored, + }, + }, + }, + special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" }, + symlink_destination = true, + }, + hijack_directories = { + enable = false, + auto_open = true, + }, + update_focused_file = { + enable = true, + debounce_delay = 15, + update_root = true, + ignore_list = {}, + }, + diagnostics = { + enable = true, + show_on_dirs = false, + show_on_open_dirs = true, + debounce_delay = 50, + severity = { + min = vim.diagnostic.severity.HINT, + max = vim.diagnostic.severity.ERROR, + }, + icons = { + hint = icons.diagnostics.BoldHint, + info = icons.diagnostics.BoldInformation, + warning = icons.diagnostics.BoldWarning, + error = icons.diagnostics.BoldError, + }, + }, filters = { dotfiles = false, git_clean = false, no_buffer = false, - custom = { "node_modules", "\\.cache", "\\.git" }, - exclude = { - ".gitignore", - ".prettierignore", - }, + custom = { "node_modules", "\\.cache" }, + exclude = {}, }, filesystem_watchers = { enable = true, @@ -26,8 +142,8 @@ nvim_tree.setup({ ignore_dirs = {}, }, git = { - enable = true, -- false dulu karena muncul error - ignore = false, -- true dulu karena muncul error + enable = true, + ignore = false, show_on_dirs = true, show_on_open_dirs = true, timeout = 200, @@ -105,72 +221,4 @@ nvim_tree.setup({ cmd = nil, args = {}, }, - renderer = { - -- root_folder_modifier = ":t", - root_folder_label = false, - indent_markers = { - enable = true, - inline_arrows = true, - icons = { - corner = "└", - edge = "│", - item = "│", - bottom = "─", - none = " ", - }, - }, - icons = { - webdev_colors = true, - show = { - git = true, - folder = true, - file = true, - folder_arrow = true, - }, - glyphs = { - default = icons.ui.Text, - symlink = icons.ui.FileSymlink, - folder = { - arrow_open = icons.ui.ChevronShortDown, - arrow_closed = icons.ui.ChevronShortRight, - default = icons.ui.Folder, - empty = icons.ui.EmptyFolder, - empty_open = icons.ui.EmptyFolderOpen, - open = icons.ui.FolderOpen, - symlink = icons.ui.FolderSymlink, - symlink_open = icons.ui.FolderSymlink, - }, - git = { - deleted = icons.git.FileDeleted, - -- ignored = icons.git.FileIgnored, - -- ignored = "", - -- ignored = "", - -- ignored = "", - -- ignored = "", - ignored = "", - -- ignored = icons.git.FileUnstaged, - renamed = icons.git.FileRenamed, - staged = icons.git.FileStaged, - unmerged = icons.git.FileUnmerged, - unstaged = icons.git.FileUnstaged, - untracked = icons.git.FileUntracked, - }, - }, - }, - }, - diagnostics = { - enable = true, - show_on_dirs = true, - icons = { - hint = icons.diagnostics.BoldHint, - info = icons.diagnostics.BoldInformation, - warning = icons.diagnostics.BoldWarning, - error = icons.diagnostics.BoldError, - }, - }, - view = { - width = 30, - -- hide_root_folder = false, - side = "left", - }, }) diff --git a/lua/user/webdevicons.lua b/lua/user/webdevicons.lua index e17466d..d6682e9 100644 --- a/lua/user/webdevicons.lua +++ b/lua/user/webdevicons.lua @@ -12,19 +12,19 @@ local prettier_icon = "" material_icon.setup({ override = { ["mjs"] = { - icon = "󰌞", + icon = "", color = "#f2c55c", cterm_color = "220", name = "Mjs", }, ["js"] = { - icon = "󰌞", + icon = "", color = "#f2c55c", cterm_color = "220", name = "javascript", }, ["ts"] = { - icon = "󰛦", + icon = "", color = "#548af7", cterm_color = "220", name = "ts", @@ -150,13 +150,13 @@ material_icon.setup({ name = "jpg", }, ["csv"] = { - icon = "", + icon = "󰈚", color = "#57965c", cterm_color = "220", name = "csv", }, ["sql"] = { - icon = "", + icon = "󰆼", color = "#b589ec", cterm_color = "220", name = "sqlfile", @@ -174,7 +174,7 @@ material_icon.setup({ name = "README_file", }, ["pdf"] = { - icon = "", + icon = "", color = "#ef510b", cterm_color = "220", name = "pdffile",