From 2eaafbc10edcf3ced541d0e4978579c8052ed665 Mon Sep 17 00:00:00 2001 From: Taken Date: Thu, 31 Aug 2023 12:14:37 +0200 Subject: [PATCH] Updating all files to use stylua Signed-off-by: Taken --- lua/taken/core/autocmd.lua | 26 +- lua/taken/core/neovide.lua | 2 +- lua/taken/core/remaps.lua | 15 +- lua/taken/lazy/lazy.lua | 372 +++++++++++++------------- lua/taken/plugins/autopairs.lua | 18 +- lua/taken/plugins/bufferline.lua | 26 +- lua/taken/plugins/catppuccin.lua | 4 +- lua/taken/plugins/comment.lua | 14 +- lua/taken/plugins/dashboard.lua | 64 ++--- lua/taken/plugins/lazy/cmdline.lua | 42 +-- lua/taken/plugins/lazy/keyseer.lua | 86 +++--- lua/taken/plugins/lazy/neogit.lua | 104 +++---- lua/taken/plugins/lazy/neorg.lua | 22 +- lua/taken/plugins/lazy/nvimcord.lua | 12 +- lua/taken/plugins/lazy/toggleterm.lua | 4 +- lua/taken/plugins/lsp/lspconfig.lua | 64 +++-- lua/taken/plugins/lsp/mason.lua | 34 +-- lua/taken/plugins/lsp/null-ls.lua | 20 +- lua/taken/plugins/lualine.lua | 292 ++++++++++---------- lua/taken/plugins/nvim-cmp.lua | 56 ++-- lua/taken/plugins/nvimtree.lua | 34 +-- lua/taken/plugins/presence.lua | 44 +-- lua/taken/plugins/telescope.lua | 42 +-- lua/taken/plugins/transparent.lua | 42 ++- lua/taken/plugins/treesitter.lua | 18 +- lua/taken/plugins/whichkey.lua | 66 ++--- stylua.toml | 2 + 27 files changed, 788 insertions(+), 737 deletions(-) create mode 100644 stylua.toml diff --git a/lua/taken/core/autocmd.lua b/lua/taken/core/autocmd.lua index f258853..f8fe75f 100644 --- a/lua/taken/core/autocmd.lua +++ b/lua/taken/core/autocmd.lua @@ -1,29 +1,29 @@ local autocmd = vim.api.nvim_create_autocmd local augroup = vim.api.nvim_create_augroup -- Groups -local neogitCmds = augroup('MyCustomNeogitEvents', { clear = true }) +local neogitCmds = augroup("MyCustomNeogitEvents", { clear = true }) local nvimhelp = augroup("help_window_right", {}) -- Neogit nvim tree refresh -autocmd('User', { - pattern = 'NeogitPushComplete', +autocmd("User", { + pattern = "NeogitPushComplete", group = neogitCmds, callback = function() - require('nvim-tree.api').tree.reload() + require("nvim-tree.api").tree.reload() end, }) -autocmd('User', { - pattern = 'NeogitPullComplete', +autocmd("User", { + pattern = "NeogitPullComplete", group = neogitCmds, callback = function() - require('nvim-tree.api').tree.reload() + require("nvim-tree.api").tree.reload() end, }) -autocmd('User', { - pattern = 'NeogitFetchComplete', +autocmd("User", { + pattern = "NeogitFetchComplete", group = neogitCmds, callback = function() - require('nvim-tree.api').tree.reload() + require("nvim-tree.api").tree.reload() end, }) @@ -31,6 +31,8 @@ autocmd("BufWinEnter", { group = nvimhelp, pattern = { "*.txt" }, callback = function() - if vim.o.filetype == 'help' then vim.cmd.wincmd("L") end - end + if vim.o.filetype == "help" then + vim.cmd.wincmd("L") + end + end, }) diff --git a/lua/taken/core/neovide.lua b/lua/taken/core/neovide.lua index 1fe9f4d..958bdef 100644 --- a/lua/taken/core/neovide.lua +++ b/lua/taken/core/neovide.lua @@ -8,7 +8,7 @@ vim.g.neovide_background_color = "#0f1117" .. alpha() ]] local neovideDir = "C:\\Program Files\\Neovide" if vim.g.neovide and vim.fn.getcwd() == neovideDir then - vim.cmd([[cd ~]]) + vim.cmd([[cd ~]]) end vim.o.guifont = "JetBrainsMono NFM:h16" diff --git a/lua/taken/core/remaps.lua b/lua/taken/core/remaps.lua index 6c0c828..283bd6d 100644 --- a/lua/taken/core/remaps.lua +++ b/lua/taken/core/remaps.lua @@ -31,14 +31,14 @@ set("n", "k", "lnextzz") set("n", "j", "lprevzz") set( - "n", - "s", - [[:%s/\<\>//gI]], - { desc = "Replace all instances of the word on cursor" } + "n", + "s", + [[:%s/\<\>//gI]], + { desc = "Replace all instances of the word on cursor" } ) set("n", "", function() - vim.cmd("so") + vim.cmd("so") end, { desc = "Source current file" }) -- telescope @@ -67,10 +67,9 @@ set("n", "lu", "Lazy", { desc = "Lazy UI" }) set("n", "n", ":NvimTreeToggle ") set("n", "e", ":NvimTreeFocus ") set("n", "r", ":NvimTreeRefresh ") -set("n", "tr", function () +set("n", "tr", function() require("nvim-tree.api").tree.change_root(vim.fn.getcwd()) -end, {desc = "Change root dir to current dir"} -) +end, { desc = "Change root dir to current dir" }) -- trouble set("n", "tt", "TroubleToggle ", { silent = true }) diff --git a/lua/taken/lazy/lazy.lua b/lua/taken/lazy/lazy.lua index 0302eb3..ddb6f9b 100644 --- a/lua/taken/lazy/lazy.lua +++ b/lua/taken/lazy/lazy.lua @@ -1,117 +1,117 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) local lazy = require("lazy") local plugins = { - { - "catppuccin/nvim", - name = "catppuccin", - priority = 1000, - }, - { "folke/tokyonight.nvim", priority = 1000, lazy = true }, - { "Mofiqul/dracula.nvim", priority = 1000, lazy = true }, - { "roflolilolmao/oceanic-next.nvim", priority = 1000, lazy = true }, - { "olimorris/onedarkpro.nvim", priority = 1000, lazy = true }, - { "NTBBloodbath/doom-one.nvim", priority = 1000, lazy = true }, - { "shaunsingh/moonlight.nvim", priority = 1000, lazy = true }, - { "kvrohit/mellow.nvim", priority = 1000, lazy = true }, - -- telescope - { - "nvim-telescope/telescope.nvim", - version = "0.1.1", - dependencies = { "nvim-lua/plenary.nvim" }, - }, - { - "nvim-telescope/telescope-file-browser.nvim", - dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, - }, - { - "nvim-telescope/telescope-project.nvim", - dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, - }, - { - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - dependencies = { "nvim-telescope/telescope.nvim" }, - }, - { - "VonHeikemen/fine-cmdline.nvim", - dependencies = { - { "MunifTanjim/nui.nvim" }, - }, - cmd = "FineCmdline", - config = function() - require("taken.plugins.lazy.cmdline") - end, - }, - -- development - { - "github/copilot.vim", - event = "VimEnter" + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, }, - { - "nvim-tree/nvim-tree.lua", - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, - --lsp - { - "williamboman/mason.nvim", - build = function() - pcall(vim.cmd, "MasonUpdate") - end, - }, - "neovim/nvim-lspconfig", - { - "williamboman/mason-lspconfig.nvim", - dependencies = { "williamboman/mason.nvim", "neovim/nvim-lspconfig" }, - }, - -- formatters and linters - "jose-elias-alvarez/null-ls.nvim", - { - "jayp0521/mason-null-ls.nvim", - dependencies = { "williamboman/mason.nvim", "jose-elias-alvarez/null-ls.nvim" }, - }, - -- completion - "hrsh7th/nvim-cmp", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - -- snippets - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - "rafamadriz/friendly-snippets", - "onsails/lspkind.nvim", - { - "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - { - "iamcco/markdown-preview.nvim", - build = function() - vim.fn["mkdp#util#install"]() - end, - config = function() - vim.cmd([[ + { "folke/tokyonight.nvim", priority = 1000, lazy = true }, + { "Mofiqul/dracula.nvim", priority = 1000, lazy = true }, + { "roflolilolmao/oceanic-next.nvim", priority = 1000, lazy = true }, + { "olimorris/onedarkpro.nvim", priority = 1000, lazy = true }, + { "NTBBloodbath/doom-one.nvim", priority = 1000, lazy = true }, + { "shaunsingh/moonlight.nvim", priority = 1000, lazy = true }, + { "kvrohit/mellow.nvim", priority = 1000, lazy = true }, + -- telescope + { + "nvim-telescope/telescope.nvim", + version = "0.1.1", + dependencies = { "nvim-lua/plenary.nvim" }, + }, + { + "nvim-telescope/telescope-file-browser.nvim", + dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, + }, + { + "nvim-telescope/telescope-project.nvim", + dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, + }, + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + dependencies = { "nvim-telescope/telescope.nvim" }, + }, + { + "VonHeikemen/fine-cmdline.nvim", + dependencies = { + { "MunifTanjim/nui.nvim" }, + }, + cmd = "FineCmdline", + config = function() + require("taken.plugins.lazy.cmdline") + end, + }, + -- development + { + "github/copilot.vim", + event = "VimEnter", + }, + { + "nvim-tree/nvim-tree.lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, + --lsp + { + "williamboman/mason.nvim", + build = function() + pcall(vim.cmd, "MasonUpdate") + end, + }, + "neovim/nvim-lspconfig", + { + "williamboman/mason-lspconfig.nvim", + dependencies = { "williamboman/mason.nvim", "neovim/nvim-lspconfig" }, + }, + -- formatters and linters + "jose-elias-alvarez/null-ls.nvim", + { + "jayp0521/mason-null-ls.nvim", + dependencies = { "williamboman/mason.nvim", "jose-elias-alvarez/null-ls.nvim" }, + }, + -- completion + "hrsh7th/nvim-cmp", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + -- snippets + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + "rafamadriz/friendly-snippets", + "onsails/lspkind.nvim", + { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + "iamcco/markdown-preview.nvim", + build = function() + vim.fn["mkdp#util#install"]() + end, + config = function() + vim.cmd([[ let g:mkdp_auto_close = 0 let g:mkdp_theme = 'dark' ]]) - end, - ft = "markdown", - }, - "numToStr/Comment.nvim", - { + end, + ft = "markdown", + }, + "numToStr/Comment.nvim", + { "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim", config = function() @@ -119,100 +119,100 @@ local plugins = { end, cmd = "Neogit", }, - { + { "sindrets/diffview.nvim", cmd = "DiffviewOpen", }, - "windwp/nvim-autopairs", - { "windwp/nvim-ts-autotag", dependencies = "nvim-treesitter" }, - { - "lewis6991/gitsigns.nvim", - config = function() - require("gitsigns").setup({}) - end, - }, - { - "f-person/git-blame.nvim", - config = function() - vim.cmd([[ + "windwp/nvim-autopairs", + { "windwp/nvim-ts-autotag", dependencies = "nvim-treesitter" }, + { + "lewis6991/gitsigns.nvim", + config = function() + require("gitsigns").setup({}) + end, + }, + { + "f-person/git-blame.nvim", + config = function() + vim.cmd([[ let g:gitblame_enabled = 1 ]]) - end, - }, - -- useful plugins - { - "glepnir/dashboard-nvim", - event = "VimEnter", - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - { - "nvim-neorg/neorg", - build = ":Neorg sync-parsers", - dependencies = "nvim-lua/plenary.nvim", - config = function() - require("taken.plugins.lazy.neorg") - end, + end, + }, + -- useful plugins + { + "glepnir/dashboard-nvim", + event = "VimEnter", + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + "nvim-neorg/neorg", + build = ":Neorg sync-parsers", + dependencies = "nvim-lua/plenary.nvim", + config = function() + require("taken.plugins.lazy.neorg") + end, cmd = "Neorg", ft = "norg", - }, - { - "NvChad/nvim-colorizer.lua", - config = function() - require("colorizer").setup({}) - end, - }, - "folke/which-key.nvim", - { - "nvim-lualine/lualine.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - }, - { - "akinsho/toggleterm.nvim", - version = "*", - config = function() - require("taken.plugins.lazy.toggleterm") - end, - cmd = "ToggleTerm", - }, - "rcarriga/nvim-notify", - { - "akinsho/bufferline.nvim", - version = "*", - dependencies = "nvim-tree/nvim-web-devicons", - }, - "TakenMC/presence.nvim", - { - "kylechui/nvim-surround", - version = "*", - config = function() - require("nvim-surround").setup({}) - end, - }, - { - "ObserverOfTime/nvimcord", - cmd = "NvimcordUpdate", - enabled = false, - config = function() - require("taken.plugins.lazy.nvimcord") - end, - }, - "xiyaowong/transparent.nvim", - { - "jokajak/keyseer.nvim", - cmd = "KeySeer", - config = function() - require("taken.plugins.lazy.keyseer") - end, - }, + }, + { + "NvChad/nvim-colorizer.lua", + config = function() + require("colorizer").setup({}) + end, + }, + "folke/which-key.nvim", + { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + "akinsho/toggleterm.nvim", + version = "*", + config = function() + require("taken.plugins.lazy.toggleterm") + end, + cmd = "ToggleTerm", + }, + "rcarriga/nvim-notify", + { + "akinsho/bufferline.nvim", + version = "*", + dependencies = "nvim-tree/nvim-web-devicons", + }, + "TakenMC/presence.nvim", + { + "kylechui/nvim-surround", + version = "*", + config = function() + require("nvim-surround").setup({}) + end, + }, + { + "ObserverOfTime/nvimcord", + cmd = "NvimcordUpdate", + enabled = false, + config = function() + require("taken.plugins.lazy.nvimcord") + end, + }, + "xiyaowong/transparent.nvim", + { + "jokajak/keyseer.nvim", + cmd = "KeySeer", + config = function() + require("taken.plugins.lazy.keyseer") + end, + }, } local opts = { - dev = { - path = "~/git/nvim", - }, - checker = { - enabled = true, - }, + dev = { + path = "~/git/nvim", + }, + checker = { + enabled = true, + }, } lazy.setup(plugins, opts) diff --git a/lua/taken/plugins/autopairs.lua b/lua/taken/plugins/autopairs.lua index 363310b..9fbd072 100644 --- a/lua/taken/plugins/autopairs.lua +++ b/lua/taken/plugins/autopairs.lua @@ -1,13 +1,13 @@ local autopairs_setup, autopairs = pcall(require, "nvim-autopairs") if not autopairs_setup then - return + return end -autopairs.setup { - check_ts = true, - ts_config = { - lua = { "string" }, - javascript = { "template_string" }, - java = false, - }, -} +autopairs.setup({ + check_ts = true, + ts_config = { + lua = { "string" }, + javascript = { "template_string" }, + java = false, + }, +}) diff --git a/lua/taken/plugins/bufferline.lua b/lua/taken/plugins/bufferline.lua index 0d74eeb..a9d350c 100644 --- a/lua/taken/plugins/bufferline.lua +++ b/lua/taken/plugins/bufferline.lua @@ -3,7 +3,7 @@ if not setup then return end -bufferline.setup { +bufferline.setup({ options = { mode = "buffers", style_preset = bufferline.style_preset.default, @@ -12,7 +12,7 @@ bufferline.setup { close_command = "bdelete! %d", indicator = { icon = "▎", - style = "icon" + style = "icon", }, max_name_length = 18, max_prefix_length = 15, @@ -23,12 +23,12 @@ bufferline.setup { filetype = "NvimTree", text = "File Explorer", highlight = "None", - padding = 1 - } + padding = 1, + }, }, color_icons = true, get_element_icon = function(element) - local icon, hl = require('nvim-web-devicons').get_icon_by_filetype(element.filetype, { default = false }) + local icon, hl = require("nvim-web-devicons").get_icon_by_filetype(element.filetype, { default = false }) return icon, hl end, always_show_bufferline = true, @@ -36,10 +36,10 @@ bufferline.setup { diagnostics_update_in_insert = false, diagnostics_indicator = function(count, level, diagnostics_dict, context) if context.buffer:current() then - return '' + return "" end - return '' + return "" end, highlights = { background = { @@ -58,12 +58,12 @@ bufferline.setup { guibg = "None", }, }, - } -} + }, +}) vim.g.transparent_groups = vim.list_extend( - vim.g.transparent_groups or {}, - vim.tbl_map(function(v) - return v.hl_group - end, vim.tbl_values(require('bufferline.config').highlights)) + vim.g.transparent_groups or {}, + vim.tbl_map(function(v) + return v.hl_group + end, vim.tbl_values(require("bufferline.config").highlights)) ) diff --git a/lua/taken/plugins/catppuccin.lua b/lua/taken/plugins/catppuccin.lua index 26f4d1a..780dadb 100644 --- a/lua/taken/plugins/catppuccin.lua +++ b/lua/taken/plugins/catppuccin.lua @@ -1,11 +1,11 @@ local status, catppuccin = pcall(require, "catppuccin") if not status then - return + return end catppuccin.setup({ integrations = { notify = true, mason = true, - } + }, }) diff --git a/lua/taken/plugins/comment.lua b/lua/taken/plugins/comment.lua index a1a210c..2416229 100644 --- a/lua/taken/plugins/comment.lua +++ b/lua/taken/plugins/comment.lua @@ -8,17 +8,17 @@ comment.setup({ sticky = true, ignore = nil, toggler = { - line = 'gcc', - block = 'gbc', + line = "gcc", + block = "gbc", }, opleader = { - line = 'gc', - block = 'gb', + line = "gc", + block = "gb", }, extra = { - above = 'gcO', - below = 'gco', - eol = 'gcA', + above = "gcO", + below = "gco", + eol = "gcA", }, mappings = { basic = true, diff --git a/lua/taken/plugins/dashboard.lua b/lua/taken/plugins/dashboard.lua index 01b8391..1a34733 100644 --- a/lua/taken/plugins/dashboard.lua +++ b/lua/taken/plugins/dashboard.lua @@ -1,6 +1,6 @@ local staus, db = pcall(require, "dashboard") if not staus then - return + return end local stats = require("lazy").stats() @@ -39,44 +39,44 @@ db.setup({ }, center = { { - icon = '󰍉 ', - icon_hl = 'main', - desc = 'Find files', - desc_hl = 'main', - key = 'f', - key_hl = 'main', - action = 'Telescope find_files', + icon = "󰍉 ", + icon_hl = "main", + desc = "Find files", + desc_hl = "main", + key = "f", + key_hl = "main", + action = "Telescope find_files", }, { - icon = ' ', - icon_hl = 'main', - desc = 'Select project', - desc_hl = 'main', - key = 'p', - key_hl = 'main', - action = 'Telescope project', + icon = " ", + icon_hl = "main", + desc = "Select project", + desc_hl = "main", + key = "p", + key_hl = "main", + action = "Telescope project", }, { - icon = ' ', - icon_hl = 'main', - desc = 'Neorg', - desc_hl = 'main', - key = 'n', - key_hl = 'main', - action = 'Neorg workspace main', + icon = " ", + icon_hl = "main", + desc = "Neorg", + desc_hl = "main", + key = "n", + key_hl = "main", + action = "Neorg workspace main", }, { - icon = '󰚰 ', - icon_hl = 'main', - desc = 'Lazy sync', - desc_hl = 'main', - key = 'l', - key_hl = 'main', - action = 'Lazy sync', + icon = "󰚰 ", + icon_hl = "main", + desc = "Lazy sync", + desc_hl = "main", + key = "l", + key_hl = "main", + action = "Lazy sync", }, }, footer = { - " " .. version .. " " .. plugins_count .. ' plugins in ' .. ms .. 'ms 󰃭 ' .. date .. '  ' .. time, - } - } + " " .. version .. " " .. plugins_count .. " plugins in " .. ms .. "ms 󰃭 " .. date .. "  " .. time, + }, + }, }) diff --git a/lua/taken/plugins/lazy/cmdline.lua b/lua/taken/plugins/lazy/cmdline.lua index 1c8547e..78cf79e 100644 --- a/lua/taken/plugins/lazy/cmdline.lua +++ b/lua/taken/plugins/lazy/cmdline.lua @@ -1,27 +1,27 @@ local status, cmdline = pcall(require, "fine-cmdline") if not status then - return + return end cmdline.setup({ - cmdline = { - enable_keymaps = true, - smart_history = true, - prompt = "> ", - }, - popup = { - position = { - row = "10%", - col = "50%", - }, - size = { - width = "80%", - }, - border = { - style = "rounded", - }, - win_options = { - winhighlight = "Normal:Normal,FloatBorder:FloatBorder", - }, - }, + cmdline = { + enable_keymaps = true, + smart_history = true, + prompt = "> ", + }, + popup = { + position = { + row = "10%", + col = "50%", + }, + size = { + width = "80%", + }, + border = { + style = "rounded", + }, + win_options = { + winhighlight = "Normal:Normal,FloatBorder:FloatBorder", + }, + }, }) diff --git a/lua/taken/plugins/lazy/keyseer.lua b/lua/taken/plugins/lazy/keyseer.lua index 3a823fb..d1d79b3 100644 --- a/lua/taken/plugins/lazy/keyseer.lua +++ b/lua/taken/plugins/lazy/keyseer.lua @@ -1,52 +1,52 @@ local status, keyseer = pcall(require, "keyseer") if not status then - return + return end keyseer.setup({ - debug = false, - initial_mode = "n", - include_builtin_keymaps = true, - include_global_keymaps = true, - include_buffer_keymaps = true, - include_modified_keypresses = false, - ignore_whichkey_conflicts = true, + debug = false, + initial_mode = "n", + include_builtin_keymaps = true, + include_global_keymaps = true, + include_buffer_keymaps = true, + include_modified_keypresses = false, + ignore_whichkey_conflicts = true, - ui = { - border = "double", - margin = { 1, 0, 1, 0 }, - winblend = 0, - size = { - width = 65, - height = 10, + ui = { + border = "double", + margin = { 1, 0, 1, 0 }, + winblend = 0, + size = { + width = 65, + height = 10, + }, + icons = { + keyseer = "", + }, + show_header = true, }, - icons = { - keyseer = "", + keyboard = { + layout = "qwertz", + keycap_padding = { 0, 1, 0, 1 }, + highlight_padding = { 0, 0, 0, 0 }, + key_labels = { + ["Up"] = "↑", + ["Down"] = "↓", + ["Left"] = "←", + ["Right"] = "→", + [""] = "F1", + [""] = "F2", + [""] = "F3", + [""] = "F4", + [""] = "F5", + [""] = "F6", + [""] = "F7", + [""] = "F8", + [""] = "F9", + [""] = "F10", + -- [""] = "SPC", + -- [""] = "RET", + -- [""] = "TAB", + }, }, - show_header = true, - }, - keyboard = { - layout = "qwertz", - keycap_padding = { 0, 1, 0, 1 }, - highlight_padding = { 0, 0, 0, 0 }, - key_labels = { - ["Up"] = "↑", - ["Down"] = "↓", - ["Left"] = "←", - ["Right"] = "→", - [""] = "F1", - [""] = "F2", - [""] = "F3", - [""] = "F4", - [""] = "F5", - [""] = "F6", - [""] = "F7", - [""] = "F8", - [""] = "F9", - [""] = "F10", - -- [""] = "SPC", - -- [""] = "RET", - -- [""] = "TAB", - }, - }, }) diff --git a/lua/taken/plugins/lazy/neogit.lua b/lua/taken/plugins/lazy/neogit.lua index 4ad973b..3408816 100644 --- a/lua/taken/plugins/lazy/neogit.lua +++ b/lua/taken/plugins/lazy/neogit.lua @@ -1,58 +1,58 @@ local setup, neogit = pcall(require, "neogit") if not setup then - return + return end neogit.setup({ - auto_refresh = true, - remember_settings = true, - disable_insert_on_commit = false, - commit_popup = { - kind = "split", - }, - preview_buffer = { - kind = "split", - }, - popup = { - kind = "split", - }, - signs = { - section = { "", "" }, - item = { "", "" }, - hunk = { "", "" }, - }, - integrations = { - diffview = true, - }, - sections = { - untracked = { - folded = false, - }, - unstaged = { - folded = false, - }, - staged = { - folded = false, - }, - stashes = { - folded = true, - }, - unpulled = { - folded = true, - hidden = false, - }, - unmerged = { - folded = false, - hidden = false, - }, - recent = { - folded = true, - }, - }, - mappings = { - status = { - ["p"] = "PushPopup", - ["P"] = "PullPopup", - }, - }, + auto_refresh = true, + remember_settings = true, + disable_insert_on_commit = false, + commit_popup = { + kind = "split", + }, + preview_buffer = { + kind = "split", + }, + popup = { + kind = "split", + }, + signs = { + section = { "", "" }, + item = { "", "" }, + hunk = { "", "" }, + }, + integrations = { + diffview = true, + }, + sections = { + untracked = { + folded = false, + }, + unstaged = { + folded = false, + }, + staged = { + folded = false, + }, + stashes = { + folded = true, + }, + unpulled = { + folded = true, + hidden = false, + }, + unmerged = { + folded = false, + hidden = false, + }, + recent = { + folded = true, + }, + }, + mappings = { + status = { + ["p"] = "PushPopup", + ["P"] = "PullPopup", + }, + }, }) diff --git a/lua/taken/plugins/lazy/neorg.lua b/lua/taken/plugins/lazy/neorg.lua index 7089a9f..fcb4633 100644 --- a/lua/taken/plugins/lazy/neorg.lua +++ b/lua/taken/plugins/lazy/neorg.lua @@ -4,15 +4,15 @@ if not status then end neorg.setup({ - load = { - ["core.defaults"] = {}, - ["core.concealer"] = {}, - ["core.dirman"] = { - config = { - workspaces = { - main = "~/neorg/main", - }, - }, - }, - }, + load = { + ["core.defaults"] = {}, + ["core.concealer"] = {}, + ["core.dirman"] = { + config = { + workspaces = { + main = "~/neorg/main", + }, + }, + }, + }, }) diff --git a/lua/taken/plugins/lazy/nvimcord.lua b/lua/taken/plugins/lazy/nvimcord.lua index 0ca50ee..ef435ef 100644 --- a/lua/taken/plugins/lazy/nvimcord.lua +++ b/lua/taken/plugins/lazy/nvimcord.lua @@ -1,17 +1,17 @@ -local setup, nvimcord = pcall(require, 'nvimcord') +local setup, nvimcord = pcall(require, "nvimcord") if not setup then return end -nvimcord.setup { +nvimcord.setup({ autostart = false, - client_id = '954365489214291979', + client_id = "954365489214291979", large_file_icon = false, log_level = vim.log.levels.DEBUG, workspace_name = function() - return vim.cmd [[pwd]] + return vim.cmd([[pwd]]) end, workspace_url = function() - return '' + return "" end, -} +}) diff --git a/lua/taken/plugins/lazy/toggleterm.lua b/lua/taken/plugins/lazy/toggleterm.lua index 6521008..84e04de 100644 --- a/lua/taken/plugins/lazy/toggleterm.lua +++ b/lua/taken/plugins/lazy/toggleterm.lua @@ -3,7 +3,7 @@ if not status then return end -toggleterm.setup { +toggleterm.setup({ shell = "pwsh.exe -nologo", start_in_insert = true, -} +}) diff --git a/lua/taken/plugins/lsp/lspconfig.lua b/lua/taken/plugins/lsp/lspconfig.lua index 51080f4..b57b350 100644 --- a/lua/taken/plugins/lsp/lspconfig.lua +++ b/lua/taken/plugins/lsp/lspconfig.lua @@ -1,33 +1,53 @@ local lspconfig_status, lspconfig = pcall(require, "lspconfig") if not lspconfig_status then - return + return end local cmp_nvim_lsp_status, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") if not cmp_nvim_lsp_status then - return + return end local on_attach = function(client, bufnr) local opts = { noremap = true, silent = true, buffer = bufnr } - vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) - vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) - vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) - vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) - vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) - vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) - vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts) - vim.keymap.set("n", "vrr", function() vim.lsp.buf.references() end, opts) - vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts) - vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) + vim.keymap.set("n", "gd", function() + vim.lsp.buf.definition() + end, opts) + vim.keymap.set("n", "K", function() + vim.lsp.buf.hover() + end, opts) + vim.keymap.set("n", "vws", function() + vim.lsp.buf.workspace_symbol() + end, opts) + vim.keymap.set("n", "vd", function() + vim.diagnostic.open_float() + end, opts) + vim.keymap.set("n", "[d", function() + vim.diagnostic.goto_next() + end, opts) + vim.keymap.set("n", "]d", function() + vim.diagnostic.goto_prev() + end, opts) + vim.keymap.set("n", "vca", function() + vim.lsp.buf.code_action() + end, opts) + vim.keymap.set("n", "vrr", function() + vim.lsp.buf.references() + end, opts) + vim.keymap.set("n", "vrn", function() + vim.lsp.buf.rename() + end, opts) + vim.keymap.set("i", "", function() + vim.lsp.buf.signature_help() + end, opts) end local capabilities = cmp_nvim_lsp.default_capabilities() local signs = { Error = " ", Warn = " ", Hint = "ﴞ ", Info = " " } for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) end lspconfig["lua_ls"].setup({ @@ -43,21 +63,21 @@ lspconfig["lua_ls"].setup({ }) lspconfig["html"].setup({ - capabilities = capabilities, - on_attach = on_attach, + capabilities = capabilities, + on_attach = on_attach, }) lspconfig["tsserver"].setup({ - capabilities = capabilities, - on_attach = on_attach, + capabilities = capabilities, + on_attach = on_attach, }) lspconfig["cssls"].setup({ - capabilities = capabilities, - on_attach = on_attach, + capabilities = capabilities, + on_attach = on_attach, }) lspconfig["pyright"].setup({ - capabilities = capabilities, - on_attach = on_attach, + capabilities = capabilities, + on_attach = on_attach, }) diff --git a/lua/taken/plugins/lsp/mason.lua b/lua/taken/plugins/lsp/mason.lua index 806b80d..b5c1c6f 100644 --- a/lua/taken/plugins/lsp/mason.lua +++ b/lua/taken/plugins/lsp/mason.lua @@ -1,36 +1,36 @@ local mason_status, mason = pcall(require, "mason") if not mason_status then - return + return end local mason_lspconfig_status, mason_lspconfig = pcall(require, "mason-lspconfig") if not mason_lspconfig_status then - return + return end local mason_null_ls_status, mason_null_ls = pcall(require, "mason-null-ls") if not mason_null_ls_status then - return + return end mason.setup() mason_lspconfig.setup({ - ensure_installed = { - "tsserver", - "html", - "cssls", - "lua_ls", - "pyright", - }, - automatic_installation = true, + ensure_installed = { + "tsserver", + "html", + "cssls", + "lua_ls", + "pyright", + }, + automatic_installation = true, }) mason_null_ls.setup({ - ensure_installed = { - "stylua", - "clang_format", - "eslint_d", - }, - automatic_installation = true, + ensure_installed = { + "stylua", + "clang_format", + "eslint_d", + }, + automatic_installation = true, }) diff --git a/lua/taken/plugins/lsp/null-ls.lua b/lua/taken/plugins/lsp/null-ls.lua index cdd5f59..d35b1df 100644 --- a/lua/taken/plugins/lsp/null-ls.lua +++ b/lua/taken/plugins/lsp/null-ls.lua @@ -1,19 +1,19 @@ local setup, null_ls = pcall(require, "null-ls") if not setup then - return + return end local formatting = null_ls.builtins.formatting local diagnostics = null_ls.builtins.diagnostics null_ls.setup({ - sources = { - formatting.stylua, - diagnostics.eslint_d.with({ - condition = function(utils) - return utils.root_has_file(".eslintrc.js") - end, - }), - formatting.clang_format, - }, + sources = { + formatting.stylua, + diagnostics.eslint_d.with({ + condition = function(utils) + return utils.root_has_file(".eslintrc.js") + end, + }), + formatting.clang_format, + }, }) diff --git a/lua/taken/plugins/lualine.lua b/lua/taken/plugins/lualine.lua index 741c2e2..62b2b26 100644 --- a/lua/taken/plugins/lualine.lua +++ b/lua/taken/plugins/lualine.lua @@ -1,133 +1,133 @@ local setup, lualine = pcall(require, "lualine") if not setup then - return + return end local colors = { - bg = "#1e1e2e", - fg = "#cdd6f4", - yellow = "#f9e2af", - cyan = "#89dceb", - darkblue = "#2374f6", - green = "#a6e3a1", - orange = "#fab387", - violet = "#f5c2e7", - magenta = "#cba6f7", - blue = "#89b4fa", - red = "#f38ba8", + bg = "#1e1e2e", + fg = "#cdd6f4", + yellow = "#f9e2af", + cyan = "#89dceb", + darkblue = "#2374f6", + green = "#a6e3a1", + orange = "#fab387", + violet = "#f5c2e7", + magenta = "#cba6f7", + blue = "#89b4fa", + red = "#f38ba8", } local conditions = { - buffer_not_empty = function() - return vim.fn.empty(vim.fn.expand("%:t")) ~= 1 - end, - hide_in_width = function() - return vim.fn.winwidth(0) > 80 - end, - check_git_workspace = function() - local filepath = vim.fn.expand("%:p:h") - local gitdir = vim.fn.finddir(".git", filepath .. ";") - return gitdir and #gitdir > 0 and #gitdir < #filepath - end, + buffer_not_empty = function() + return vim.fn.empty(vim.fn.expand("%:t")) ~= 1 + end, + hide_in_width = function() + return vim.fn.winwidth(0) > 80 + end, + check_git_workspace = function() + local filepath = vim.fn.expand("%:p:h") + local gitdir = vim.fn.finddir(".git", filepath .. ";") + return gitdir and #gitdir > 0 and #gitdir < #filepath + end, } -- Config local config = { - options = { - -- Disable sections and component separators - component_separators = "", - section_separators = "", - theme = { - -- We are going to use lualine_c an lualine_x as left and - -- right section. Both are highlighted by c theme . So we - -- are just setting default looks o statusline - normal = { c = { fg = colors.fg, bg = colors.bg } }, - inactive = { c = { fg = colors.fg, bg = colors.bg } }, - }, - }, - sections = { - -- these are to remove the defaults - lualine_a = {}, - lualine_b = {}, - lualine_y = {}, - lualine_z = {}, - -- These will be filled later - lualine_c = {}, - lualine_x = {}, - }, - inactive_sections = { - -- these are to remove the defaults - lualine_a = {}, - lualine_b = {}, - lualine_y = {}, - lualine_z = {}, - lualine_c = {}, - lualine_x = {}, - }, + options = { + -- Disable sections and component separators + component_separators = "", + section_separators = "", + theme = { + -- We are going to use lualine_c an lualine_x as left and + -- right section. Both are highlighted by c theme . So we + -- are just setting default looks o statusline + normal = { c = { fg = colors.fg, bg = colors.bg } }, + inactive = { c = { fg = colors.fg, bg = colors.bg } }, + }, + }, + sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_b = {}, + lualine_y = {}, + lualine_z = {}, + -- These will be filled later + lualine_c = {}, + lualine_x = {}, + }, + inactive_sections = { + -- these are to remove the defaults + lualine_a = {}, + lualine_b = {}, + lualine_y = {}, + lualine_z = {}, + lualine_c = {}, + lualine_x = {}, + }, } -- Inserts a component in lualine_c at left section local function ins_left(component) - table.insert(config.sections.lualine_c, component) + table.insert(config.sections.lualine_c, component) end -- Inserts a component in lualine_x at right section local function ins_right(component) - table.insert(config.sections.lualine_x, component) + table.insert(config.sections.lualine_x, component) end ins_left({ - function() - return "▊" - end, - color = { fg = colors.blue }, -- Sets highlighting of component - padding = { left = 0, right = 1 }, -- We don't need space before this + function() + return "▊" + end, + color = { fg = colors.blue }, -- Sets highlighting of component + padding = { left = 0, right = 1 }, -- We don't need space before this }) ins_left({ - -- mode component - function() - return "" - end, - color = function() - -- auto change color according to neovims mode - local mode_color = { - n = colors.red, - i = colors.green, - v = colors.blue, - [""] = colors.blue, - V = colors.blue, - c = colors.magenta, - no = colors.red, - s = colors.orange, - S = colors.orange, - [""] = colors.orange, - ic = colors.yellow, - R = colors.violet, - Rv = colors.violet, - cv = colors.red, - ce = colors.red, - r = colors.cyan, - rm = colors.cyan, - ["r?"] = colors.cyan, - ["!"] = colors.red, - t = colors.red, - } - return { fg = mode_color[vim.fn.mode()] } - end, - padding = { right = 1 }, + -- mode component + function() + return "" + end, + color = function() + -- auto change color according to neovims mode + local mode_color = { + n = colors.red, + i = colors.green, + v = colors.blue, + [""] = colors.blue, + V = colors.blue, + c = colors.magenta, + no = colors.red, + s = colors.orange, + S = colors.orange, + [""] = colors.orange, + ic = colors.yellow, + R = colors.violet, + Rv = colors.violet, + cv = colors.red, + ce = colors.red, + r = colors.cyan, + rm = colors.cyan, + ["r?"] = colors.cyan, + ["!"] = colors.red, + t = colors.red, + } + return { fg = mode_color[vim.fn.mode()] } + end, + padding = { right = 1 }, }) ins_left({ - -- filesize component - "filesize", - cond = conditions.buffer_not_empty, + -- filesize component + "filesize", + cond = conditions.buffer_not_empty, }) ins_left({ - "filename", - cond = conditions.buffer_not_empty, - color = { fg = colors.magenta, gui = "bold" }, + "filename", + cond = conditions.buffer_not_empty, + color = { fg = colors.magenta, gui = "bold" }, }) ins_left({ "location" }) @@ -135,76 +135,76 @@ ins_left({ "location" }) ins_left({ "progress", color = { fg = colors.fg, gui = "bold" } }) ins_left({ - "diagnostics", - sources = { "nvim_diagnostic" }, - symbols = { error = " ", warn = " ", info = " " }, - diagnostics_color = { - color_error = { fg = colors.red }, - color_warn = { fg = colors.yellow }, - color_info = { fg = colors.cyan }, - }, + "diagnostics", + sources = { "nvim_diagnostic" }, + symbols = { error = " ", warn = " ", info = " " }, + diagnostics_color = { + color_error = { fg = colors.red }, + color_warn = { fg = colors.yellow }, + color_info = { fg = colors.cyan }, + }, }) -- Insert mid section. You can make any number of sections in neovim :) -- for lualine it's any number greater then 2 ins_left({ - function() - return "%=" - end, + function() + return "%=" + end, }) ins_right({ - -- Lsp server name . - function() - local msg = "No Active Lsp" - local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") - local clients = vim.lsp.get_active_clients() - if next(clients) == nil then - return msg - end - for _, client in ipairs(clients) do - local filetypes = client.config.filetypes - if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then - return client.name - end - end - return msg - end, - icon = " :", - color = { fg = "#ffffff", gui = "bold" }, + -- Lsp server name . + function() + local msg = "No Active Lsp" + local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") + local clients = vim.lsp.get_active_clients() + if next(clients) == nil then + return msg + end + for _, client in ipairs(clients) do + local filetypes = client.config.filetypes + if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then + return client.name + end + end + return msg + end, + icon = " :", + color = { fg = "#ffffff", gui = "bold" }, }) -- Add components to right sections ins_right({ require("lazy.status").updates, - cond = require("lazy.status").has_updates, - color = { fg = colors.violet }, + cond = require("lazy.status").has_updates, + color = { fg = colors.violet }, }) ins_right({ - "branch", - icon = "", - color = { fg = colors.violet, gui = "bold" }, + "branch", + icon = "", + color = { fg = colors.violet, gui = "bold" }, }) ins_right({ - "diff", - -- Is it me or the symbol for modified us really weird - symbols = { added = " ", modified = "󰝤 ", removed = " " }, - diff_color = { - added = { fg = colors.green }, - modified = { fg = colors.orange }, - removed = { fg = colors.red }, - }, - cond = conditions.hide_in_width, + "diff", + -- Is it me or the symbol for modified us really weird + symbols = { added = " ", modified = "󰝤 ", removed = " " }, + diff_color = { + added = { fg = colors.green }, + modified = { fg = colors.orange }, + removed = { fg = colors.red }, + }, + cond = conditions.hide_in_width, }) ins_right({ - function() - return "▊" - end, - color = { fg = colors.blue }, - padding = { left = 1 }, + function() + return "▊" + end, + color = { fg = colors.blue }, + padding = { left = 1 }, }) -- Now don't forget to initialize lualine diff --git a/lua/taken/plugins/nvim-cmp.lua b/lua/taken/plugins/nvim-cmp.lua index 28e8efe..8165a2b 100644 --- a/lua/taken/plugins/nvim-cmp.lua +++ b/lua/taken/plugins/nvim-cmp.lua @@ -1,16 +1,16 @@ local cmp_status, cmp = pcall(require, "cmp") if not cmp_status then - return + return end local luasnip_status, luasnip = pcall(require, "luasnip") if not luasnip_status then - return + return end local lspkind_status, lspkind = pcall(require, "lspkind") if not lspkind_status then - return + return end require("luasnip/loaders/from_vscode").lazy_load() @@ -18,30 +18,30 @@ require("luasnip/loaders/from_vscode").lazy_load() vim.opt.completeopt = "menu,menuone,noselect" cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_prev_item(), -- previous suggestion - [""] = cmp.mapping.select_next_item(), -- next suggestion - [""] = cmp.mapping.complete(), -- show completion suggestions - [""] = cmp.mapping.confirm({ select = false }), - [''] = nil, - [''] = nil - }), - - sources = cmp.config.sources({ - { name = "nvim_lsp" }, -- lsp - { name = "luasnip" }, -- snippets - { name = "buffer" }, -- text within current buffer - { name = "path" }, -- file system paths - }), - formatting = { - format = lspkind.cmp_format({ - maxwidth = 50, - ellipsis_char = "...", + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), -- previous suggestion + [""] = cmp.mapping.select_next_item(), -- next suggestion + [""] = cmp.mapping.complete(), -- show completion suggestions + [""] = cmp.mapping.confirm({ select = false }), + [""] = nil, + [""] = nil, }), - }, + + sources = cmp.config.sources({ + { name = "nvim_lsp" }, -- lsp + { name = "luasnip" }, -- snippets + { name = "buffer" }, -- text within current buffer + { name = "path" }, -- file system paths + }), + formatting = { + format = lspkind.cmp_format({ + maxwidth = 50, + ellipsis_char = "...", + }), + }, }) diff --git a/lua/taken/plugins/nvimtree.lua b/lua/taken/plugins/nvimtree.lua index c222a85..16c718c 100644 --- a/lua/taken/plugins/nvimtree.lua +++ b/lua/taken/plugins/nvimtree.lua @@ -1,24 +1,24 @@ local setup, nvimtree = pcall(require, "nvim-tree") if not setup then - return + return end nvimtree.setup({ - sync_root_with_cwd = true, - view = { - width = 30, - }, - git = { - ignore = false, - }, - filters = { - dotfiles = false, - custom = { - "node_modules", - ".git" - }, + sync_root_with_cwd = true, + view = { + width = 30, + }, + git = { + ignore = false, + }, + filters = { + dotfiles = false, + custom = { + "node_modules", + ".git", + }, exclude = { - ".gitignore" - } - }, + ".gitignore", + }, + }, }) diff --git a/lua/taken/plugins/presence.lua b/lua/taken/plugins/presence.lua index 052726c..a05ba3f 100644 --- a/lua/taken/plugins/presence.lua +++ b/lua/taken/plugins/presence.lua @@ -1,29 +1,29 @@ local setup, presence = pcall(require, "presence") if not setup then - return + return end presence.setup({ - auto_update = true, - neovim_image_text = "The One True Text Editor", - main_image = "neovim", - client_id = "793271441293967371", - log_level = info, - debounce_timeout = 10, - enable_line_number = false, - blacklist = {}, - buttons = { - { label = "Neovim", url = "https://github.com/neovim/neovim" }, - { label = "My config", url = "https://gitlab.com/taken-personal/neovim-config" }, - }, - file_assets = {}, - show_time = true, + auto_update = true, + neovim_image_text = "The One True Text Editor", + main_image = "neovim", + client_id = "793271441293967371", + log_level = info, + debounce_timeout = 10, + enable_line_number = false, + blacklist = {}, + buttons = { + { label = "Neovim", url = "https://github.com/neovim/neovim" }, + { label = "My config", url = "https://gitlab.com/taken-personal/neovim-config" }, + }, + file_assets = {}, + show_time = true, - editing_text = "Editing %s", - file_explorer_text = "Browsing %s", - git_commit_text = "Committing changes", - plugin_manager_text = "Managing plugins", - reading_text = "Reading %s", - workspace_text = "Working on %s", - line_number_text = "Line %s out of %s", + editing_text = "Editing %s", + file_explorer_text = "Browsing %s", + git_commit_text = "Committing changes", + plugin_manager_text = "Managing plugins", + reading_text = "Reading %s", + workspace_text = "Working on %s", + line_number_text = "Line %s out of %s", }) diff --git a/lua/taken/plugins/telescope.lua b/lua/taken/plugins/telescope.lua index e5b360b..d13f170 100644 --- a/lua/taken/plugins/telescope.lua +++ b/lua/taken/plugins/telescope.lua @@ -1,31 +1,31 @@ local telescope_setup, telescope = pcall(require, "telescope") if not telescope_setup then - return + return end telescope.load_extension("project") telescope.setup({ - extensions = { - project = { - sync_with_nvim_tree = true, - on_project_selected = function() - require("nvim-tree.api").tree.change_root(vim.fn.getcwd()) - end, - }, - file_browser = { - hidden = { - file_browser = true, - folder_browser = true, - }, - }, - fzf = { - fuzzy = true, -- false will only do exact matching - override_generic_sorter = true, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = "smart_case", -- or "ignore_case" or "respect_case" - }, - }, + extensions = { + project = { + sync_with_nvim_tree = true, + on_project_selected = function() + require("nvim-tree.api").tree.change_root(vim.fn.getcwd()) + end, + }, + file_browser = { + hidden = { + file_browser = true, + folder_browser = true, + }, + }, + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = true, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case", -- or "ignore_case" or "respect_case" + }, + }, }) telescope.load_extension("file_browser") diff --git a/lua/taken/plugins/transparent.lua b/lua/taken/plugins/transparent.lua index efce0a7..ebb9607 100644 --- a/lua/taken/plugins/transparent.lua +++ b/lua/taken/plugins/transparent.lua @@ -5,15 +5,43 @@ end transparent.setup({ groups = { - 'Normal', 'NormalNC', 'Comment', 'Constant', 'Special', 'Identifier', - 'Statement', 'PreProc', 'Type', 'Underlined', 'Todo', 'String', 'Function', - 'Conditional', 'Repeat', 'Operator', 'Structure', 'LineNr', 'NonText', - 'SignColumn', 'CursorLineNr', 'EndOfBuffer', + "Normal", + "NormalNC", + "Comment", + "Constant", + "Special", + "Identifier", + "Statement", + "PreProc", + "Type", + "Underlined", + "Todo", + "String", + "Function", + "Conditional", + "Repeat", + "Operator", + "Structure", + "LineNr", + "NonText", + "SignColumn", + "CursorLineNr", + "EndOfBuffer", }, extra_groups = { - "NormalSB", "NvimTreeNormal", "NvimTreeNormalNC", "NvimTreeNormalSB", - "Folded", "NonText", "SpecialKey", "VertSplit", "EndOfBuffer", "SignColumn", - "BufferLineFill", "BufferLineBackground", "BufferLineBufferSelected", + "NormalSB", + "NvimTreeNormal", + "NvimTreeNormalNC", + "NvimTreeNormalSB", + "Folded", + "NonText", + "SpecialKey", + "VertSplit", + "EndOfBuffer", + "SignColumn", + "BufferLineFill", + "BufferLineBackground", + "BufferLineBufferSelected", }, exclude_groups = {}, }) diff --git a/lua/taken/plugins/treesitter.lua b/lua/taken/plugins/treesitter.lua index c668dd2..1710012 100644 --- a/lua/taken/plugins/treesitter.lua +++ b/lua/taken/plugins/treesitter.lua @@ -3,13 +3,13 @@ if not status then return end -treesitter.setup { - ensure_installed = { "lua", "vim", "vimdoc", "javascript", "java", "json" }, - sync_install = false, - auto_install = true, +treesitter.setup({ + ensure_installed = { "lua", "vim", "vimdoc", "javascript", "java", "json" }, + sync_install = false, + auto_install = true, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, -} + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, +}) diff --git a/lua/taken/plugins/whichkey.lua b/lua/taken/plugins/whichkey.lua index c7519d4..c07ec5c 100644 --- a/lua/taken/plugins/whichkey.lua +++ b/lua/taken/plugins/whichkey.lua @@ -4,45 +4,45 @@ if not status then end whichkey.setup({ - key_labels = { + key_labels = { [""] = "SPC", - [""] = "SPC", - [""] = "RET", - [""] = "RET", - [""] = "TAB", - }, + [""] = "SPC", + [""] = "RET", + [""] = "RET", + [""] = "TAB", + }, icons = { breadcrumb = "»", separator = "➜", group = "➜", - } + }, }) whichkey.register({ - [""] = { - w = { - name = "window", - }, - f = { - name = "find", - }, - b = { - name = "buffer", - }, - g = { - name = "git", - }, - l = { - name = "lazy", - }, - t = { - name = "toggle", - }, - v = { - name = "lsp", - }, - h = { - name = "theme", - }, - }, + [""] = { + w = { + name = "window", + }, + f = { + name = "find", + }, + b = { + name = "buffer", + }, + g = { + name = "git", + }, + l = { + name = "lazy", + }, + t = { + name = "toggle", + }, + v = { + name = "lsp", + }, + h = { + name = "theme", + }, + }, }) diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..a10ab56 --- /dev/null +++ b/stylua.toml @@ -0,0 +1,2 @@ +indent_type = "Spaces" +indent_width = 4