From de4b8a1d7648e87ce1553d60a259015482ea8069 Mon Sep 17 00:00:00 2001 From: kurniawan Date: Sun, 10 Mar 2024 15:32:29 +0700 Subject: [PATCH] add plugins --- lua/custom/plugins/catppuccin.lua | 53 ++++++++++++++++++++++++++++ lua/custom/plugins/filetree.lua | 15 -------- lua/custom/plugins/flutter-tools.lua | 9 +++++ lua/custom/plugins/lualine.lua | 45 +++++++++++++++++++++++ lua/custom/plugins/oil.lua | 13 ++++--- lua/custom/plugins/todo-comment.lua | 10 ++++++ lua/custom/plugins/trouble.lua | 9 +++++ 7 files changed, 134 insertions(+), 20 deletions(-) create mode 100644 lua/custom/plugins/catppuccin.lua delete mode 100644 lua/custom/plugins/filetree.lua create mode 100644 lua/custom/plugins/flutter-tools.lua create mode 100644 lua/custom/plugins/lualine.lua create mode 100644 lua/custom/plugins/todo-comment.lua create mode 100644 lua/custom/plugins/trouble.lua diff --git a/lua/custom/plugins/catppuccin.lua b/lua/custom/plugins/catppuccin.lua new file mode 100644 index 00000000..ad973ec2 --- /dev/null +++ b/lua/custom/plugins/catppuccin.lua @@ -0,0 +1,53 @@ +return { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + config = function() + require("catppuccin").setup({ + flavour = "mocha", -- latte, frappe, macchiato, mocha + background = { -- :h background + light = "latte", + dark = "mocha", + }, + transparent_background = true, -- disables setting the background color. + show_end_of_buffer = false, -- shows the '~' characters after the end of buffers + term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`) + dim_inactive = { + enabled = false, -- dims the background color of inactive window + shade = "dark", + percentage = 0.15, -- percentage of the shade to apply to the inactive window + }, + no_italic = false, -- Force no italic + no_bold = false, -- Force no bold + no_underline = false, -- Force no underline + styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): + comments = { "italic" }, -- Change the style of comments + conditionals = { "italic" }, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + operators = {}, + -- miscs = {}, -- Uncomment to turn off hard-coded styles + }, + color_overrides = {}, + custom_highlights = {}, + integrations = { + cmp = true, + gitsigns = true, + nvimtree = true, + treesitter = true, + notify = false, + mini = { + enabled = true, + indentscope_color = "", + }, + }, + }) + end, +} diff --git a/lua/custom/plugins/filetree.lua b/lua/custom/plugins/filetree.lua deleted file mode 100644 index ace5060f..00000000 --- a/lua/custom/plugins/filetree.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Unless you are still migrating, remove the deprecated commands from v1.x -vim.cmd([[ let g:neo_tree_remove_legacy_commands = 2 ]]) - -return { - "nvim-neo-tree/neo-tree.nvim", - version = "*", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - }, - config = function () - require('neo-tree').setup() - end, -} diff --git a/lua/custom/plugins/flutter-tools.lua b/lua/custom/plugins/flutter-tools.lua new file mode 100644 index 00000000..edf9d42c --- /dev/null +++ b/lua/custom/plugins/flutter-tools.lua @@ -0,0 +1,9 @@ +return { + 'akinsho/flutter-tools.nvim', + lazy = false, + dependencies = { + 'nvim-lua/plenary.nvim', + 'stevearc/dressing.nvim', -- optional for vim.ui.select + }, + config = true, +} diff --git a/lua/custom/plugins/lualine.lua b/lua/custom/plugins/lualine.lua new file mode 100644 index 00000000..83ab6c91 --- /dev/null +++ b/lua/custom/plugins/lualine.lua @@ -0,0 +1,45 @@ +return { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = false, + theme = 'auto', + component_separators = { left = '〉', right = '〈' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { '%h%f %m' }, + lualine_x = { 'encoding', 'fileformat', 'filetype' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {}, + }, +} diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua index 873700ec..45b2b5bf 100644 --- a/lua/custom/plugins/oil.lua +++ b/lua/custom/plugins/oil.lua @@ -43,10 +43,13 @@ return { -- You can set the delay to false to disable cleanup entirely -- Note that the cleanup process only starts when none of the oil buffers are currently displayed cleanup_delay_ms = 2000, - -- Set to true to autosave buffers that are updated with LSP willRenameFiles - -- Set to "unmodified" to only save unmodified buffers - -- Set to false to turn off autosave - lsp_rename_autosave = "unmodified", + lsp_file_methods = { + -- Time to wait for LSP file operations to complete before skipping + timeout_ms = 1000, + -- Set to true to autosave buffers that are updated with LSP willRenameFiles + -- Set to "unmodified" to only save unmodified buffers + autosave_changes = false, + }, -- Constrain the cursor to the editable parts of the oil buffer -- Set to `false` to disable, or "name" to keep it on the file names constrain_cursor = "editable", @@ -121,7 +124,7 @@ return { -- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) -- min_width and max_width can be a single value or a list of mixed integer/float types. -- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total" - max_width = {100, 0.8}, + max_width = 0.9, -- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total" min_width = { 40, 0.4 }, -- optionally define an integer/float for the exact width of the preview window diff --git a/lua/custom/plugins/todo-comment.lua b/lua/custom/plugins/todo-comment.lua new file mode 100644 index 00000000..b1e88835 --- /dev/null +++ b/lua/custom/plugins/todo-comment.lua @@ -0,0 +1,10 @@ +return { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + signs = false + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } +} diff --git a/lua/custom/plugins/trouble.lua b/lua/custom/plugins/trouble.lua new file mode 100644 index 00000000..7e92648b --- /dev/null +++ b/lua/custom/plugins/trouble.lua @@ -0,0 +1,9 @@ +return { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, +}