Updating all files to use stylua

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2023-08-31 12:14:37 +02:00
parent 4e07e36ca7
commit 2eaafbc10e
27 changed files with 788 additions and 737 deletions

View File

@@ -1,29 +1,29 @@
local autocmd = vim.api.nvim_create_autocmd local autocmd = vim.api.nvim_create_autocmd
local augroup = vim.api.nvim_create_augroup local augroup = vim.api.nvim_create_augroup
-- Groups -- Groups
local neogitCmds = augroup('MyCustomNeogitEvents', { clear = true }) local neogitCmds = augroup("MyCustomNeogitEvents", { clear = true })
local nvimhelp = augroup("help_window_right", {}) local nvimhelp = augroup("help_window_right", {})
-- Neogit nvim tree refresh -- Neogit nvim tree refresh
autocmd('User', { autocmd("User", {
pattern = 'NeogitPushComplete', pattern = "NeogitPushComplete",
group = neogitCmds, group = neogitCmds,
callback = function() callback = function()
require('nvim-tree.api').tree.reload() require("nvim-tree.api").tree.reload()
end, end,
}) })
autocmd('User', { autocmd("User", {
pattern = 'NeogitPullComplete', pattern = "NeogitPullComplete",
group = neogitCmds, group = neogitCmds,
callback = function() callback = function()
require('nvim-tree.api').tree.reload() require("nvim-tree.api").tree.reload()
end, end,
}) })
autocmd('User', { autocmd("User", {
pattern = 'NeogitFetchComplete', pattern = "NeogitFetchComplete",
group = neogitCmds, group = neogitCmds,
callback = function() callback = function()
require('nvim-tree.api').tree.reload() require("nvim-tree.api").tree.reload()
end, end,
}) })
@@ -31,6 +31,8 @@ autocmd("BufWinEnter", {
group = nvimhelp, group = nvimhelp,
pattern = { "*.txt" }, pattern = { "*.txt" },
callback = function() callback = function()
if vim.o.filetype == 'help' then vim.cmd.wincmd("L") end if vim.o.filetype == "help" then
end vim.cmd.wincmd("L")
end
end,
}) })

View File

@@ -8,7 +8,7 @@ vim.g.neovide_background_color = "#0f1117" .. alpha() ]]
local neovideDir = "C:\\Program Files\\Neovide" local neovideDir = "C:\\Program Files\\Neovide"
if vim.g.neovide and vim.fn.getcwd() == neovideDir then if vim.g.neovide and vim.fn.getcwd() == neovideDir then
vim.cmd([[cd ~]]) vim.cmd([[cd ~]])
end end
vim.o.guifont = "JetBrainsMono NFM:h16" vim.o.guifont = "JetBrainsMono NFM:h16"

View File

@@ -31,14 +31,14 @@ set("n", "<leader>k", "<cmd>lnext<CR>zz")
set("n", "<leader>j", "<cmd>lprev<CR>zz") set("n", "<leader>j", "<cmd>lprev<CR>zz")
set( set(
"n", "n",
"<leader>s", "<leader>s",
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
{ desc = "Replace all instances of the word on cursor" } { desc = "Replace all instances of the word on cursor" }
) )
set("n", "<leader><leader>", function() set("n", "<leader><leader>", function()
vim.cmd("so") vim.cmd("so")
end, { desc = "Source current file" }) end, { desc = "Source current file" })
-- telescope -- telescope
@@ -67,10 +67,9 @@ set("n", "<leader>lu", "<cmd>Lazy<CR>", { desc = "Lazy UI" })
set("n", "<leader>n", ":NvimTreeToggle <CR>") set("n", "<leader>n", ":NvimTreeToggle <CR>")
set("n", "<leader>e", ":NvimTreeFocus <CR>") set("n", "<leader>e", ":NvimTreeFocus <CR>")
set("n", "<leader>r", ":NvimTreeRefresh <CR>") set("n", "<leader>r", ":NvimTreeRefresh <CR>")
set("n", "<leader>tr", function () set("n", "<leader>tr", function()
require("nvim-tree.api").tree.change_root(vim.fn.getcwd()) 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 -- trouble
set("n", "<leader>tt", "<cmd>TroubleToggle <CR>", { silent = true }) set("n", "<leader>tt", "<cmd>TroubleToggle <CR>", { silent = true })

View File

@@ -1,117 +1,117 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ vim.fn.system({
"git", "git",
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release "--branch=stable", -- latest stable release
lazypath, lazypath,
}) })
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
local lazy = require("lazy") local lazy = require("lazy")
local plugins = { local plugins = {
{ {
"catppuccin/nvim", "catppuccin/nvim",
name = "catppuccin", name = "catppuccin",
priority = 1000, 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"
}, },
{ { "folke/tokyonight.nvim", priority = 1000, lazy = true },
"nvim-tree/nvim-tree.lua", { "Mofiqul/dracula.nvim", priority = 1000, lazy = true },
dependencies = { "nvim-tree/nvim-web-devicons" }, { "roflolilolmao/oceanic-next.nvim", priority = 1000, lazy = true },
}, { "olimorris/onedarkpro.nvim", priority = 1000, lazy = true },
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, { "NTBBloodbath/doom-one.nvim", priority = 1000, lazy = true },
--lsp { "shaunsingh/moonlight.nvim", priority = 1000, lazy = true },
{ { "kvrohit/mellow.nvim", priority = 1000, lazy = true },
"williamboman/mason.nvim", -- telescope
build = function() {
pcall(vim.cmd, "MasonUpdate") "nvim-telescope/telescope.nvim",
end, version = "0.1.1",
}, dependencies = { "nvim-lua/plenary.nvim" },
"neovim/nvim-lspconfig", },
{ {
"williamboman/mason-lspconfig.nvim", "nvim-telescope/telescope-file-browser.nvim",
dependencies = { "williamboman/mason.nvim", "neovim/nvim-lspconfig" }, dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
}, },
-- formatters and linters {
"jose-elias-alvarez/null-ls.nvim", "nvim-telescope/telescope-project.nvim",
{ dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
"jayp0521/mason-null-ls.nvim", },
dependencies = { "williamboman/mason.nvim", "jose-elias-alvarez/null-ls.nvim" }, {
}, "nvim-telescope/telescope-fzf-native.nvim",
-- completion build = "make",
"hrsh7th/nvim-cmp", dependencies = { "nvim-telescope/telescope.nvim" },
"hrsh7th/cmp-nvim-lsp", },
"hrsh7th/cmp-buffer", {
"hrsh7th/cmp-path", "VonHeikemen/fine-cmdline.nvim",
-- snippets dependencies = {
"L3MON4D3/LuaSnip", { "MunifTanjim/nui.nvim" },
"saadparwaiz1/cmp_luasnip", },
"rafamadriz/friendly-snippets", cmd = "FineCmdline",
"onsails/lspkind.nvim", config = function()
{ require("taken.plugins.lazy.cmdline")
"folke/trouble.nvim", end,
dependencies = { "nvim-tree/nvim-web-devicons" }, },
}, -- development
{ {
"iamcco/markdown-preview.nvim", "github/copilot.vim",
build = function() event = "VimEnter",
vim.fn["mkdp#util#install"]() },
end, {
config = function() "nvim-tree/nvim-tree.lua",
vim.cmd([[ 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_auto_close = 0
let g:mkdp_theme = 'dark' let g:mkdp_theme = 'dark'
]]) ]])
end, end,
ft = "markdown", ft = "markdown",
}, },
"numToStr/Comment.nvim", "numToStr/Comment.nvim",
{ {
"NeogitOrg/neogit", "NeogitOrg/neogit",
dependencies = "nvim-lua/plenary.nvim", dependencies = "nvim-lua/plenary.nvim",
config = function() config = function()
@@ -119,100 +119,100 @@ local plugins = {
end, end,
cmd = "Neogit", cmd = "Neogit",
}, },
{ {
"sindrets/diffview.nvim", "sindrets/diffview.nvim",
cmd = "DiffviewOpen", cmd = "DiffviewOpen",
}, },
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
{ "windwp/nvim-ts-autotag", dependencies = "nvim-treesitter" }, { "windwp/nvim-ts-autotag", dependencies = "nvim-treesitter" },
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
config = function() config = function()
require("gitsigns").setup({}) require("gitsigns").setup({})
end, end,
}, },
{ {
"f-person/git-blame.nvim", "f-person/git-blame.nvim",
config = function() config = function()
vim.cmd([[ vim.cmd([[
let g:gitblame_enabled = 1 let g:gitblame_enabled = 1
]]) ]])
end, end,
}, },
-- useful plugins -- useful plugins
{ {
"glepnir/dashboard-nvim", "glepnir/dashboard-nvim",
event = "VimEnter", event = "VimEnter",
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
}, },
{ {
"nvim-neorg/neorg", "nvim-neorg/neorg",
build = ":Neorg sync-parsers", build = ":Neorg sync-parsers",
dependencies = "nvim-lua/plenary.nvim", dependencies = "nvim-lua/plenary.nvim",
config = function() config = function()
require("taken.plugins.lazy.neorg") require("taken.plugins.lazy.neorg")
end, end,
cmd = "Neorg", cmd = "Neorg",
ft = "norg", ft = "norg",
}, },
{ {
"NvChad/nvim-colorizer.lua", "NvChad/nvim-colorizer.lua",
config = function() config = function()
require("colorizer").setup({}) require("colorizer").setup({})
end, end,
}, },
"folke/which-key.nvim", "folke/which-key.nvim",
{ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
}, },
{ {
"akinsho/toggleterm.nvim", "akinsho/toggleterm.nvim",
version = "*", version = "*",
config = function() config = function()
require("taken.plugins.lazy.toggleterm") require("taken.plugins.lazy.toggleterm")
end, end,
cmd = "ToggleTerm", cmd = "ToggleTerm",
}, },
"rcarriga/nvim-notify", "rcarriga/nvim-notify",
{ {
"akinsho/bufferline.nvim", "akinsho/bufferline.nvim",
version = "*", version = "*",
dependencies = "nvim-tree/nvim-web-devicons", dependencies = "nvim-tree/nvim-web-devicons",
}, },
"TakenMC/presence.nvim", "TakenMC/presence.nvim",
{ {
"kylechui/nvim-surround", "kylechui/nvim-surround",
version = "*", version = "*",
config = function() config = function()
require("nvim-surround").setup({}) require("nvim-surround").setup({})
end, end,
}, },
{ {
"ObserverOfTime/nvimcord", "ObserverOfTime/nvimcord",
cmd = "NvimcordUpdate", cmd = "NvimcordUpdate",
enabled = false, enabled = false,
config = function() config = function()
require("taken.plugins.lazy.nvimcord") require("taken.plugins.lazy.nvimcord")
end, end,
}, },
"xiyaowong/transparent.nvim", "xiyaowong/transparent.nvim",
{ {
"jokajak/keyseer.nvim", "jokajak/keyseer.nvim",
cmd = "KeySeer", cmd = "KeySeer",
config = function() config = function()
require("taken.plugins.lazy.keyseer") require("taken.plugins.lazy.keyseer")
end, end,
}, },
} }
local opts = { local opts = {
dev = { dev = {
path = "~/git/nvim", path = "~/git/nvim",
}, },
checker = { checker = {
enabled = true, enabled = true,
}, },
} }
lazy.setup(plugins, opts) lazy.setup(plugins, opts)

View File

@@ -1,13 +1,13 @@
local autopairs_setup, autopairs = pcall(require, "nvim-autopairs") local autopairs_setup, autopairs = pcall(require, "nvim-autopairs")
if not autopairs_setup then if not autopairs_setup then
return return
end end
autopairs.setup { autopairs.setup({
check_ts = true, check_ts = true,
ts_config = { ts_config = {
lua = { "string" }, lua = { "string" },
javascript = { "template_string" }, javascript = { "template_string" },
java = false, java = false,
}, },
} })

View File

@@ -3,7 +3,7 @@ if not setup then
return return
end end
bufferline.setup { bufferline.setup({
options = { options = {
mode = "buffers", mode = "buffers",
style_preset = bufferline.style_preset.default, style_preset = bufferline.style_preset.default,
@@ -12,7 +12,7 @@ bufferline.setup {
close_command = "bdelete! %d", close_command = "bdelete! %d",
indicator = { indicator = {
icon = "", icon = "",
style = "icon" style = "icon",
}, },
max_name_length = 18, max_name_length = 18,
max_prefix_length = 15, max_prefix_length = 15,
@@ -23,12 +23,12 @@ bufferline.setup {
filetype = "NvimTree", filetype = "NvimTree",
text = "File Explorer", text = "File Explorer",
highlight = "None", highlight = "None",
padding = 1 padding = 1,
} },
}, },
color_icons = true, color_icons = true,
get_element_icon = function(element) 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 return icon, hl
end, end,
always_show_bufferline = true, always_show_bufferline = true,
@@ -36,10 +36,10 @@ bufferline.setup {
diagnostics_update_in_insert = false, diagnostics_update_in_insert = false,
diagnostics_indicator = function(count, level, diagnostics_dict, context) diagnostics_indicator = function(count, level, diagnostics_dict, context)
if context.buffer:current() then if context.buffer:current() then
return '' return ""
end end
return '' return ""
end, end,
highlights = { highlights = {
background = { background = {
@@ -58,12 +58,12 @@ bufferline.setup {
guibg = "None", guibg = "None",
}, },
}, },
} },
} })
vim.g.transparent_groups = vim.list_extend( vim.g.transparent_groups = vim.list_extend(
vim.g.transparent_groups or {}, vim.g.transparent_groups or {},
vim.tbl_map(function(v) vim.tbl_map(function(v)
return v.hl_group return v.hl_group
end, vim.tbl_values(require('bufferline.config').highlights)) end, vim.tbl_values(require("bufferline.config").highlights))
) )

View File

@@ -1,11 +1,11 @@
local status, catppuccin = pcall(require, "catppuccin") local status, catppuccin = pcall(require, "catppuccin")
if not status then if not status then
return return
end end
catppuccin.setup({ catppuccin.setup({
integrations = { integrations = {
notify = true, notify = true,
mason = true, mason = true,
} },
}) })

View File

@@ -8,17 +8,17 @@ comment.setup({
sticky = true, sticky = true,
ignore = nil, ignore = nil,
toggler = { toggler = {
line = 'gcc', line = "gcc",
block = 'gbc', block = "gbc",
}, },
opleader = { opleader = {
line = 'gc', line = "gc",
block = 'gb', block = "gb",
}, },
extra = { extra = {
above = 'gcO', above = "gcO",
below = 'gco', below = "gco",
eol = 'gcA', eol = "gcA",
}, },
mappings = { mappings = {
basic = true, basic = true,

View File

@@ -1,6 +1,6 @@
local staus, db = pcall(require, "dashboard") local staus, db = pcall(require, "dashboard")
if not staus then if not staus then
return return
end end
local stats = require("lazy").stats() local stats = require("lazy").stats()
@@ -39,44 +39,44 @@ db.setup({
}, },
center = { center = {
{ {
icon = '󰍉 ', icon = "󰍉 ",
icon_hl = 'main', icon_hl = "main",
desc = 'Find files', desc = "Find files",
desc_hl = 'main', desc_hl = "main",
key = 'f', key = "f",
key_hl = 'main', key_hl = "main",
action = 'Telescope find_files', action = "Telescope find_files",
}, },
{ {
icon = '', icon = "",
icon_hl = 'main', icon_hl = "main",
desc = 'Select project', desc = "Select project",
desc_hl = 'main', desc_hl = "main",
key = 'p', key = "p",
key_hl = 'main', key_hl = "main",
action = 'Telescope project', action = "Telescope project",
}, },
{ {
icon = '', icon = "",
icon_hl = 'main', icon_hl = "main",
desc = 'Neorg', desc = "Neorg",
desc_hl = 'main', desc_hl = "main",
key = 'n', key = "n",
key_hl = 'main', key_hl = "main",
action = 'Neorg workspace main', action = "Neorg workspace main",
}, },
{ {
icon = '󰚰 ', icon = "󰚰 ",
icon_hl = 'main', icon_hl = "main",
desc = 'Lazy sync', desc = "Lazy sync",
desc_hl = 'main', desc_hl = "main",
key = 'l', key = "l",
key_hl = 'main', key_hl = "main",
action = 'Lazy sync', action = "Lazy sync",
}, },
}, },
footer = { footer = {
"" .. version .. " " .. plugins_count .. ' plugins in ' .. ms .. 'ms 󰃭 ' .. date .. '' .. time, "" .. version .. " " .. plugins_count .. " plugins in " .. ms .. "ms 󰃭 " .. date .. "" .. time,
} },
} },
}) })

View File

@@ -1,27 +1,27 @@
local status, cmdline = pcall(require, "fine-cmdline") local status, cmdline = pcall(require, "fine-cmdline")
if not status then if not status then
return return
end end
cmdline.setup({ cmdline.setup({
cmdline = { cmdline = {
enable_keymaps = true, enable_keymaps = true,
smart_history = true, smart_history = true,
prompt = "> ", prompt = "> ",
}, },
popup = { popup = {
position = { position = {
row = "10%", row = "10%",
col = "50%", col = "50%",
}, },
size = { size = {
width = "80%", width = "80%",
}, },
border = { border = {
style = "rounded", style = "rounded",
}, },
win_options = { win_options = {
winhighlight = "Normal:Normal,FloatBorder:FloatBorder", winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
}, },
}, },
}) })

View File

@@ -1,52 +1,52 @@
local status, keyseer = pcall(require, "keyseer") local status, keyseer = pcall(require, "keyseer")
if not status then if not status then
return return
end end
keyseer.setup({ keyseer.setup({
debug = false, debug = false,
initial_mode = "n", initial_mode = "n",
include_builtin_keymaps = true, include_builtin_keymaps = true,
include_global_keymaps = true, include_global_keymaps = true,
include_buffer_keymaps = true, include_buffer_keymaps = true,
include_modified_keypresses = false, include_modified_keypresses = false,
ignore_whichkey_conflicts = true, ignore_whichkey_conflicts = true,
ui = { ui = {
border = "double", border = "double",
margin = { 1, 0, 1, 0 }, margin = { 1, 0, 1, 0 },
winblend = 0, winblend = 0,
size = { size = {
width = 65, width = 65,
height = 10, height = 10,
},
icons = {
keyseer = "",
},
show_header = true,
}, },
icons = { keyboard = {
keyseer = "", layout = "qwertz",
keycap_padding = { 0, 1, 0, 1 },
highlight_padding = { 0, 0, 0, 0 },
key_labels = {
["Up"] = "",
["Down"] = "",
["Left"] = "",
["Right"] = "",
["<F1>"] = "F1",
["<F2>"] = "F2",
["<F3>"] = "F3",
["<F4>"] = "F4",
["<F5>"] = "F5",
["<F6>"] = "F6",
["<F7>"] = "F7",
["<F8>"] = "F8",
["<F9>"] = "F9",
["<F10>"] = "F10",
-- ["<space>"] = "SPC",
-- ["<cr>"] = "RET",
-- ["<tab>"] = "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>"] = "F1",
["<F2>"] = "F2",
["<F3>"] = "F3",
["<F4>"] = "F4",
["<F5>"] = "F5",
["<F6>"] = "F6",
["<F7>"] = "F7",
["<F8>"] = "F8",
["<F9>"] = "F9",
["<F10>"] = "F10",
-- ["<space>"] = "SPC",
-- ["<cr>"] = "RET",
-- ["<tab>"] = "TAB",
},
},
}) })

View File

@@ -1,58 +1,58 @@
local setup, neogit = pcall(require, "neogit") local setup, neogit = pcall(require, "neogit")
if not setup then if not setup then
return return
end end
neogit.setup({ neogit.setup({
auto_refresh = true, auto_refresh = true,
remember_settings = true, remember_settings = true,
disable_insert_on_commit = false, disable_insert_on_commit = false,
commit_popup = { commit_popup = {
kind = "split", kind = "split",
}, },
preview_buffer = { preview_buffer = {
kind = "split", kind = "split",
}, },
popup = { popup = {
kind = "split", kind = "split",
}, },
signs = { signs = {
section = { "", "" }, section = { "", "" },
item = { "", "" }, item = { "", "" },
hunk = { "", "" }, hunk = { "", "" },
}, },
integrations = { integrations = {
diffview = true, diffview = true,
}, },
sections = { sections = {
untracked = { untracked = {
folded = false, folded = false,
}, },
unstaged = { unstaged = {
folded = false, folded = false,
}, },
staged = { staged = {
folded = false, folded = false,
}, },
stashes = { stashes = {
folded = true, folded = true,
}, },
unpulled = { unpulled = {
folded = true, folded = true,
hidden = false, hidden = false,
}, },
unmerged = { unmerged = {
folded = false, folded = false,
hidden = false, hidden = false,
}, },
recent = { recent = {
folded = true, folded = true,
}, },
}, },
mappings = { mappings = {
status = { status = {
["p"] = "PushPopup", ["p"] = "PushPopup",
["P"] = "PullPopup", ["P"] = "PullPopup",
}, },
}, },
}) })

View File

@@ -4,15 +4,15 @@ if not status then
end end
neorg.setup({ neorg.setup({
load = { load = {
["core.defaults"] = {}, ["core.defaults"] = {},
["core.concealer"] = {}, ["core.concealer"] = {},
["core.dirman"] = { ["core.dirman"] = {
config = { config = {
workspaces = { workspaces = {
main = "~/neorg/main", main = "~/neorg/main",
}, },
}, },
}, },
}, },
}) })

View File

@@ -1,17 +1,17 @@
local setup, nvimcord = pcall(require, 'nvimcord') local setup, nvimcord = pcall(require, "nvimcord")
if not setup then if not setup then
return return
end end
nvimcord.setup { nvimcord.setup({
autostart = false, autostart = false,
client_id = '954365489214291979', client_id = "954365489214291979",
large_file_icon = false, large_file_icon = false,
log_level = vim.log.levels.DEBUG, log_level = vim.log.levels.DEBUG,
workspace_name = function() workspace_name = function()
return vim.cmd [[pwd]] return vim.cmd([[pwd]])
end, end,
workspace_url = function() workspace_url = function()
return '' return ""
end, end,
} })

View File

@@ -3,7 +3,7 @@ if not status then
return return
end end
toggleterm.setup { toggleterm.setup({
shell = "pwsh.exe -nologo", shell = "pwsh.exe -nologo",
start_in_insert = true, start_in_insert = true,
} })

View File

@@ -1,33 +1,53 @@
local lspconfig_status, lspconfig = pcall(require, "lspconfig") local lspconfig_status, lspconfig = pcall(require, "lspconfig")
if not lspconfig_status then if not lspconfig_status then
return return
end end
local cmp_nvim_lsp_status, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") local cmp_nvim_lsp_status, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
if not cmp_nvim_lsp_status then if not cmp_nvim_lsp_status then
return return
end end
local on_attach = function(client, bufnr) local on_attach = function(client, bufnr)
local opts = { noremap = true, silent = true, buffer = 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", "gd", function()
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) vim.lsp.buf.definition()
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts) end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts) vim.keymap.set("n", "K", function()
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) vim.lsp.buf.hover()
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts) vim.keymap.set("n", "<leader>vws", function()
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts) vim.lsp.buf.workspace_symbol()
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts) end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts) vim.keymap.set("n", "<leader>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", "<leader>vca", function()
vim.lsp.buf.code_action()
end, opts)
vim.keymap.set("n", "<leader>vrr", function()
vim.lsp.buf.references()
end, opts)
vim.keymap.set("n", "<leader>vrn", function()
vim.lsp.buf.rename()
end, opts)
vim.keymap.set("i", "<C-h>", function()
vim.lsp.buf.signature_help()
end, opts)
end end
local capabilities = cmp_nvim_lsp.default_capabilities() local capabilities = cmp_nvim_lsp.default_capabilities()
local signs = { Error = "", Warn = "", Hint = "", Info = "" } local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end end
lspconfig["lua_ls"].setup({ lspconfig["lua_ls"].setup({
@@ -43,21 +63,21 @@ lspconfig["lua_ls"].setup({
}) })
lspconfig["html"].setup({ lspconfig["html"].setup({
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
}) })
lspconfig["tsserver"].setup({ lspconfig["tsserver"].setup({
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
}) })
lspconfig["cssls"].setup({ lspconfig["cssls"].setup({
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
}) })
lspconfig["pyright"].setup({ lspconfig["pyright"].setup({
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
}) })

View File

@@ -1,36 +1,36 @@
local mason_status, mason = pcall(require, "mason") local mason_status, mason = pcall(require, "mason")
if not mason_status then if not mason_status then
return return
end end
local mason_lspconfig_status, mason_lspconfig = pcall(require, "mason-lspconfig") local mason_lspconfig_status, mason_lspconfig = pcall(require, "mason-lspconfig")
if not mason_lspconfig_status then if not mason_lspconfig_status then
return return
end end
local mason_null_ls_status, mason_null_ls = pcall(require, "mason-null-ls") local mason_null_ls_status, mason_null_ls = pcall(require, "mason-null-ls")
if not mason_null_ls_status then if not mason_null_ls_status then
return return
end end
mason.setup() mason.setup()
mason_lspconfig.setup({ mason_lspconfig.setup({
ensure_installed = { ensure_installed = {
"tsserver", "tsserver",
"html", "html",
"cssls", "cssls",
"lua_ls", "lua_ls",
"pyright", "pyright",
}, },
automatic_installation = true, automatic_installation = true,
}) })
mason_null_ls.setup({ mason_null_ls.setup({
ensure_installed = { ensure_installed = {
"stylua", "stylua",
"clang_format", "clang_format",
"eslint_d", "eslint_d",
}, },
automatic_installation = true, automatic_installation = true,
}) })

View File

@@ -1,19 +1,19 @@
local setup, null_ls = pcall(require, "null-ls") local setup, null_ls = pcall(require, "null-ls")
if not setup then if not setup then
return return
end end
local formatting = null_ls.builtins.formatting local formatting = null_ls.builtins.formatting
local diagnostics = null_ls.builtins.diagnostics local diagnostics = null_ls.builtins.diagnostics
null_ls.setup({ null_ls.setup({
sources = { sources = {
formatting.stylua, formatting.stylua,
diagnostics.eslint_d.with({ diagnostics.eslint_d.with({
condition = function(utils) condition = function(utils)
return utils.root_has_file(".eslintrc.js") return utils.root_has_file(".eslintrc.js")
end, end,
}), }),
formatting.clang_format, formatting.clang_format,
}, },
}) })

View File

@@ -1,133 +1,133 @@
local setup, lualine = pcall(require, "lualine") local setup, lualine = pcall(require, "lualine")
if not setup then if not setup then
return return
end end
local colors = { local colors = {
bg = "#1e1e2e", bg = "#1e1e2e",
fg = "#cdd6f4", fg = "#cdd6f4",
yellow = "#f9e2af", yellow = "#f9e2af",
cyan = "#89dceb", cyan = "#89dceb",
darkblue = "#2374f6", darkblue = "#2374f6",
green = "#a6e3a1", green = "#a6e3a1",
orange = "#fab387", orange = "#fab387",
violet = "#f5c2e7", violet = "#f5c2e7",
magenta = "#cba6f7", magenta = "#cba6f7",
blue = "#89b4fa", blue = "#89b4fa",
red = "#f38ba8", red = "#f38ba8",
} }
local conditions = { local conditions = {
buffer_not_empty = function() buffer_not_empty = function()
return vim.fn.empty(vim.fn.expand("%:t")) ~= 1 return vim.fn.empty(vim.fn.expand("%:t")) ~= 1
end, end,
hide_in_width = function() hide_in_width = function()
return vim.fn.winwidth(0) > 80 return vim.fn.winwidth(0) > 80
end, end,
check_git_workspace = function() check_git_workspace = function()
local filepath = vim.fn.expand("%:p:h") local filepath = vim.fn.expand("%:p:h")
local gitdir = vim.fn.finddir(".git", filepath .. ";") local gitdir = vim.fn.finddir(".git", filepath .. ";")
return gitdir and #gitdir > 0 and #gitdir < #filepath return gitdir and #gitdir > 0 and #gitdir < #filepath
end, end,
} }
-- Config -- Config
local config = { local config = {
options = { options = {
-- Disable sections and component separators -- Disable sections and component separators
component_separators = "", component_separators = "",
section_separators = "", section_separators = "",
theme = { theme = {
-- We are going to use lualine_c an lualine_x as left and -- We are going to use lualine_c an lualine_x as left and
-- right section. Both are highlighted by c theme . So we -- right section. Both are highlighted by c theme . So we
-- are just setting default looks o statusline -- are just setting default looks o statusline
normal = { c = { fg = colors.fg, bg = colors.bg } }, normal = { c = { fg = colors.fg, bg = colors.bg } },
inactive = { c = { fg = colors.fg, bg = colors.bg } }, inactive = { c = { fg = colors.fg, bg = colors.bg } },
}, },
}, },
sections = { sections = {
-- these are to remove the defaults -- these are to remove the defaults
lualine_a = {}, lualine_a = {},
lualine_b = {}, lualine_b = {},
lualine_y = {}, lualine_y = {},
lualine_z = {}, lualine_z = {},
-- These will be filled later -- These will be filled later
lualine_c = {}, lualine_c = {},
lualine_x = {}, lualine_x = {},
}, },
inactive_sections = { inactive_sections = {
-- these are to remove the defaults -- these are to remove the defaults
lualine_a = {}, lualine_a = {},
lualine_b = {}, lualine_b = {},
lualine_y = {}, lualine_y = {},
lualine_z = {}, lualine_z = {},
lualine_c = {}, lualine_c = {},
lualine_x = {}, lualine_x = {},
}, },
} }
-- Inserts a component in lualine_c at left section -- Inserts a component in lualine_c at left section
local function ins_left(component) local function ins_left(component)
table.insert(config.sections.lualine_c, component) table.insert(config.sections.lualine_c, component)
end end
-- Inserts a component in lualine_x at right section -- Inserts a component in lualine_x at right section
local function ins_right(component) local function ins_right(component)
table.insert(config.sections.lualine_x, component) table.insert(config.sections.lualine_x, component)
end end
ins_left({ ins_left({
function() function()
return "" return ""
end, end,
color = { fg = colors.blue }, -- Sets highlighting of component color = { fg = colors.blue }, -- Sets highlighting of component
padding = { left = 0, right = 1 }, -- We don't need space before this padding = { left = 0, right = 1 }, -- We don't need space before this
}) })
ins_left({ ins_left({
-- mode component -- mode component
function() function()
return "" return ""
end, end,
color = function() color = function()
-- auto change color according to neovims mode -- auto change color according to neovims mode
local mode_color = { local mode_color = {
n = colors.red, n = colors.red,
i = colors.green, i = colors.green,
v = colors.blue, v = colors.blue,
[""] = colors.blue, [""] = colors.blue,
V = colors.blue, V = colors.blue,
c = colors.magenta, c = colors.magenta,
no = colors.red, no = colors.red,
s = colors.orange, s = colors.orange,
S = colors.orange, S = colors.orange,
[""] = colors.orange, [""] = colors.orange,
ic = colors.yellow, ic = colors.yellow,
R = colors.violet, R = colors.violet,
Rv = colors.violet, Rv = colors.violet,
cv = colors.red, cv = colors.red,
ce = colors.red, ce = colors.red,
r = colors.cyan, r = colors.cyan,
rm = colors.cyan, rm = colors.cyan,
["r?"] = colors.cyan, ["r?"] = colors.cyan,
["!"] = colors.red, ["!"] = colors.red,
t = colors.red, t = colors.red,
} }
return { fg = mode_color[vim.fn.mode()] } return { fg = mode_color[vim.fn.mode()] }
end, end,
padding = { right = 1 }, padding = { right = 1 },
}) })
ins_left({ ins_left({
-- filesize component -- filesize component
"filesize", "filesize",
cond = conditions.buffer_not_empty, cond = conditions.buffer_not_empty,
}) })
ins_left({ ins_left({
"filename", "filename",
cond = conditions.buffer_not_empty, cond = conditions.buffer_not_empty,
color = { fg = colors.magenta, gui = "bold" }, color = { fg = colors.magenta, gui = "bold" },
}) })
ins_left({ "location" }) ins_left({ "location" })
@@ -135,76 +135,76 @@ ins_left({ "location" })
ins_left({ "progress", color = { fg = colors.fg, gui = "bold" } }) ins_left({ "progress", color = { fg = colors.fg, gui = "bold" } })
ins_left({ ins_left({
"diagnostics", "diagnostics",
sources = { "nvim_diagnostic" }, sources = { "nvim_diagnostic" },
symbols = { error = "", warn = "", info = "" }, symbols = { error = "", warn = "", info = "" },
diagnostics_color = { diagnostics_color = {
color_error = { fg = colors.red }, color_error = { fg = colors.red },
color_warn = { fg = colors.yellow }, color_warn = { fg = colors.yellow },
color_info = { fg = colors.cyan }, color_info = { fg = colors.cyan },
}, },
}) })
-- Insert mid section. You can make any number of sections in neovim :) -- Insert mid section. You can make any number of sections in neovim :)
-- for lualine it's any number greater then 2 -- for lualine it's any number greater then 2
ins_left({ ins_left({
function() function()
return "%=" return "%="
end, end,
}) })
ins_right({ ins_right({
-- Lsp server name . -- Lsp server name .
function() function()
local msg = "No Active Lsp" local msg = "No Active Lsp"
local buf_ft = vim.api.nvim_buf_get_option(0, "filetype") local buf_ft = vim.api.nvim_buf_get_option(0, "filetype")
local clients = vim.lsp.get_active_clients() local clients = vim.lsp.get_active_clients()
if next(clients) == nil then if next(clients) == nil then
return msg return msg
end end
for _, client in ipairs(clients) do for _, client in ipairs(clients) do
local filetypes = client.config.filetypes local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name return client.name
end end
end end
return msg return msg
end, end,
icon = " :", icon = " :",
color = { fg = "#ffffff", gui = "bold" }, color = { fg = "#ffffff", gui = "bold" },
}) })
-- Add components to right sections -- Add components to right sections
ins_right({ ins_right({
require("lazy.status").updates, require("lazy.status").updates,
cond = require("lazy.status").has_updates, cond = require("lazy.status").has_updates,
color = { fg = colors.violet }, color = { fg = colors.violet },
}) })
ins_right({ ins_right({
"branch", "branch",
icon = "", icon = "",
color = { fg = colors.violet, gui = "bold" }, color = { fg = colors.violet, gui = "bold" },
}) })
ins_right({ ins_right({
"diff", "diff",
-- Is it me or the symbol for modified us really weird -- Is it me or the symbol for modified us really weird
symbols = { added = "", modified = "󰝤 ", removed = "" }, symbols = { added = "", modified = "󰝤 ", removed = "" },
diff_color = { diff_color = {
added = { fg = colors.green }, added = { fg = colors.green },
modified = { fg = colors.orange }, modified = { fg = colors.orange },
removed = { fg = colors.red }, removed = { fg = colors.red },
}, },
cond = conditions.hide_in_width, cond = conditions.hide_in_width,
}) })
ins_right({ ins_right({
function() function()
return "" return ""
end, end,
color = { fg = colors.blue }, color = { fg = colors.blue },
padding = { left = 1 }, padding = { left = 1 },
}) })
-- Now don't forget to initialize lualine -- Now don't forget to initialize lualine

View File

@@ -1,16 +1,16 @@
local cmp_status, cmp = pcall(require, "cmp") local cmp_status, cmp = pcall(require, "cmp")
if not cmp_status then if not cmp_status then
return return
end end
local luasnip_status, luasnip = pcall(require, "luasnip") local luasnip_status, luasnip = pcall(require, "luasnip")
if not luasnip_status then if not luasnip_status then
return return
end end
local lspkind_status, lspkind = pcall(require, "lspkind") local lspkind_status, lspkind = pcall(require, "lspkind")
if not lspkind_status then if not lspkind_status then
return return
end end
require("luasnip/loaders/from_vscode").lazy_load() require("luasnip/loaders/from_vscode").lazy_load()
@@ -18,30 +18,30 @@ require("luasnip/loaders/from_vscode").lazy_load()
vim.opt.completeopt = "menu,menuone,noselect" vim.opt.completeopt = "menu,menuone,noselect"
cmp.setup({ cmp.setup({
snippet = { snippet = {
expand = function(args) expand = function(args)
luasnip.lsp_expand(args.body) luasnip.lsp_expand(args.body)
end, end,
}, },
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-p>"] = cmp.mapping.select_prev_item(), -- previous suggestion ["<C-p>"] = cmp.mapping.select_prev_item(), -- previous suggestion
["<C-n>"] = cmp.mapping.select_next_item(), -- next suggestion ["<C-n>"] = cmp.mapping.select_next_item(), -- next suggestion
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions ["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<CR>"] = cmp.mapping.confirm({ select = false }), ["<CR>"] = cmp.mapping.confirm({ select = false }),
['<Tab>'] = nil, ["<Tab>"] = nil,
['<S-Tab>'] = nil ["<S-Tab>"] = 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 = "...",
}), }),
},
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 = "...",
}),
},
}) })

View File

@@ -1,24 +1,24 @@
local setup, nvimtree = pcall(require, "nvim-tree") local setup, nvimtree = pcall(require, "nvim-tree")
if not setup then if not setup then
return return
end end
nvimtree.setup({ nvimtree.setup({
sync_root_with_cwd = true, sync_root_with_cwd = true,
view = { view = {
width = 30, width = 30,
}, },
git = { git = {
ignore = false, ignore = false,
}, },
filters = { filters = {
dotfiles = false, dotfiles = false,
custom = { custom = {
"node_modules", "node_modules",
".git" ".git",
}, },
exclude = { exclude = {
".gitignore" ".gitignore",
} },
}, },
}) })

View File

@@ -1,29 +1,29 @@
local setup, presence = pcall(require, "presence") local setup, presence = pcall(require, "presence")
if not setup then if not setup then
return return
end end
presence.setup({ presence.setup({
auto_update = true, auto_update = true,
neovim_image_text = "The One True Text Editor", neovim_image_text = "The One True Text Editor",
main_image = "neovim", main_image = "neovim",
client_id = "793271441293967371", client_id = "793271441293967371",
log_level = info, log_level = info,
debounce_timeout = 10, debounce_timeout = 10,
enable_line_number = false, enable_line_number = false,
blacklist = {}, blacklist = {},
buttons = { buttons = {
{ label = "Neovim", url = "https://github.com/neovim/neovim" }, { label = "Neovim", url = "https://github.com/neovim/neovim" },
{ label = "My config", url = "https://gitlab.com/taken-personal/neovim-config" }, { label = "My config", url = "https://gitlab.com/taken-personal/neovim-config" },
}, },
file_assets = {}, file_assets = {},
show_time = true, show_time = true,
editing_text = "Editing %s", editing_text = "Editing %s",
file_explorer_text = "Browsing %s", file_explorer_text = "Browsing %s",
git_commit_text = "Committing changes", git_commit_text = "Committing changes",
plugin_manager_text = "Managing plugins", plugin_manager_text = "Managing plugins",
reading_text = "Reading %s", reading_text = "Reading %s",
workspace_text = "Working on %s", workspace_text = "Working on %s",
line_number_text = "Line %s out of %s", line_number_text = "Line %s out of %s",
}) })

View File

@@ -1,31 +1,31 @@
local telescope_setup, telescope = pcall(require, "telescope") local telescope_setup, telescope = pcall(require, "telescope")
if not telescope_setup then if not telescope_setup then
return return
end end
telescope.load_extension("project") telescope.load_extension("project")
telescope.setup({ telescope.setup({
extensions = { extensions = {
project = { project = {
sync_with_nvim_tree = true, sync_with_nvim_tree = true,
on_project_selected = function() on_project_selected = function()
require("nvim-tree.api").tree.change_root(vim.fn.getcwd()) require("nvim-tree.api").tree.change_root(vim.fn.getcwd())
end, end,
}, },
file_browser = { file_browser = {
hidden = { hidden = {
file_browser = true, file_browser = true,
folder_browser = true, folder_browser = true,
}, },
}, },
fzf = { fzf = {
fuzzy = true, -- false will only do exact matching fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case" case_mode = "smart_case", -- or "ignore_case" or "respect_case"
}, },
}, },
}) })
telescope.load_extension("file_browser") telescope.load_extension("file_browser")

View File

@@ -5,15 +5,43 @@ end
transparent.setup({ transparent.setup({
groups = { groups = {
'Normal', 'NormalNC', 'Comment', 'Constant', 'Special', 'Identifier', "Normal",
'Statement', 'PreProc', 'Type', 'Underlined', 'Todo', 'String', 'Function', "NormalNC",
'Conditional', 'Repeat', 'Operator', 'Structure', 'LineNr', 'NonText', "Comment",
'SignColumn', 'CursorLineNr', 'EndOfBuffer', "Constant",
"Special",
"Identifier",
"Statement",
"PreProc",
"Type",
"Underlined",
"Todo",
"String",
"Function",
"Conditional",
"Repeat",
"Operator",
"Structure",
"LineNr",
"NonText",
"SignColumn",
"CursorLineNr",
"EndOfBuffer",
}, },
extra_groups = { extra_groups = {
"NormalSB", "NvimTreeNormal", "NvimTreeNormalNC", "NvimTreeNormalSB", "NormalSB",
"Folded", "NonText", "SpecialKey", "VertSplit", "EndOfBuffer", "SignColumn", "NvimTreeNormal",
"BufferLineFill", "BufferLineBackground", "BufferLineBufferSelected", "NvimTreeNormalNC",
"NvimTreeNormalSB",
"Folded",
"NonText",
"SpecialKey",
"VertSplit",
"EndOfBuffer",
"SignColumn",
"BufferLineFill",
"BufferLineBackground",
"BufferLineBufferSelected",
}, },
exclude_groups = {}, exclude_groups = {},
}) })

View File

@@ -3,13 +3,13 @@ if not status then
return return
end end
treesitter.setup { treesitter.setup({
ensure_installed = { "lua", "vim", "vimdoc", "javascript", "java", "json" }, ensure_installed = { "lua", "vim", "vimdoc", "javascript", "java", "json" },
sync_install = false, sync_install = false,
auto_install = true, auto_install = true,
highlight = { highlight = {
enable = true, enable = true,
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
}, },
} })

View File

@@ -4,45 +4,45 @@ if not status then
end end
whichkey.setup({ whichkey.setup({
key_labels = { key_labels = {
["<leader>"] = "SPC", ["<leader>"] = "SPC",
["<space>"] = "SPC", ["<space>"] = "SPC",
["<cr>"] = "RET", ["<cr>"] = "RET",
["<CR>"] = "RET", ["<CR>"] = "RET",
["<Tab>"] = "TAB", ["<Tab>"] = "TAB",
}, },
icons = { icons = {
breadcrumb = "»", breadcrumb = "»",
separator = "", separator = "",
group = "", group = "",
} },
}) })
whichkey.register({ whichkey.register({
["<leader>"] = { ["<leader>"] = {
w = { w = {
name = "window", name = "window",
}, },
f = { f = {
name = "find", name = "find",
}, },
b = { b = {
name = "buffer", name = "buffer",
}, },
g = { g = {
name = "git", name = "git",
}, },
l = { l = {
name = "lazy", name = "lazy",
}, },
t = { t = {
name = "toggle", name = "toggle",
}, },
v = { v = {
name = "lsp", name = "lsp",
}, },
h = { h = {
name = "theme", name = "theme",
}, },
}, },
}) })

2
stylua.toml Normal file
View File

@@ -0,0 +1,2 @@
indent_type = "Spaces"
indent_width = 4