summaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
authorKyren223 <ulmliad223@gmail.com>2024-06-29 19:58:44 +0300
committerKyren223 <ulmliad223@gmail.com>2024-06-29 19:58:44 +0300
commit7043a38d8e36e1c8a5dd64efd72479e67c756019 (patch)
treef215e2a476644201d199cbfe0a98244d3d698091 /.config/nvim
parent205321756857344dd1ea9a673a2e63d21873a9d9 (diff)
Reformatted nvim config to fit stylua guidelines
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/init.lua9
-rw-r--r--.config/nvim/lua/autocmds.lua10
-rw-r--r--.config/nvim/lua/keymaps.lua15
-rw-r--r--.config/nvim/lua/options.lua13
-rw-r--r--.config/nvim/lua/plugin-manager.lua15
-rw-r--r--.config/nvim/lua/plugins.lua2
-rw-r--r--.config/nvim/lua/plugins/alpha.lua55
-rw-r--r--.config/nvim/lua/plugins/catppuccin.lua7
-rw-r--r--.config/nvim/lua/plugins/comment.lua6
-rw-r--r--.config/nvim/lua/plugins/completions.lua42
-rw-r--r--.config/nvim/lua/plugins/indent-blankline.lua10
-rw-r--r--.config/nvim/lua/plugins/lazydev.lua22
-rw-r--r--.config/nvim/lua/plugins/lsp.lua49
-rw-r--r--.config/nvim/lua/plugins/lualine.lua10
-rw-r--r--.config/nvim/lua/plugins/neotree.lua15
-rw-r--r--.config/nvim/lua/plugins/none-ls.lua6
-rw-r--r--.config/nvim/lua/plugins/smartyank.lua1
-rw-r--r--.config/nvim/lua/plugins/telescope.lua49
-rw-r--r--.config/nvim/lua/plugins/todo.lua60
-rw-r--r--.config/nvim/lua/plugins/tokyonight.lua9
-rw-r--r--.config/nvim/lua/plugins/treesitter.lua8
-rw-r--r--.config/nvim/lua/plugins/vim-tmux-navigator.lua2
-rw-r--r--.config/nvim/lua/plugins/which-key.lua5
-rw-r--r--.config/nvim/nvim/.luarc.json5
-rw-r--r--.config/nvim/nvim/lazy-lock.json18
l---------.config/nvim/nvim/nvim1
-rw-r--r--.config/nvim/nvim/stylua.toml6
-rw-r--r--.config/nvim/stylua.toml4
28 files changed, 209 insertions, 245 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
index 93ec34f..ad6df15 100644
--- a/.config/nvim/init.lua
+++ b/.config/nvim/init.lua
@@ -1,5 +1,4 @@
-require("options")
-require("keymaps")
-require("autocmds")
-require("plugin-manager")
-
+require('options')
+require('keymaps')
+require('autocmds')
+require('plugin-manager')
diff --git a/.config/nvim/lua/autocmds.lua b/.config/nvim/lua/autocmds.lua
index a9a4d7b..0dca469 100644
--- a/.config/nvim/lua/autocmds.lua
+++ b/.config/nvim/lua/autocmds.lua
@@ -1,7 +1,7 @@
vim.api.nvim_create_autocmd('TextYankPost', {
- desc = 'Highlight when yanking (copying) text',
- group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
- callback = function()
- vim.highlight.on_yank()
- end,
+ desc = 'Highlight when yanking (copying) text',
+ group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
+ callback = function()
+ vim.highlight.on_yank()
+ end,
})
diff --git a/.config/nvim/lua/keymaps.lua b/.config/nvim/lua/keymaps.lua
index 8501c64..95144dd 100644
--- a/.config/nvim/lua/keymaps.lua
+++ b/.config/nvim/lua/keymaps.lua
@@ -1,5 +1,5 @@
-- Misc
-vim.keymap.set({ 'n', 'i'}, '<C-a>', '<Esc>ggVG', { desc = 'Visually Highlight [A]ll' })
+vim.keymap.set({ 'n', 'i' }, '<C-a>', '<Esc>ggVG', { desc = 'Visually Highlight [A]ll' })
vim.keymap.set('n', '<Esc>', ':nohlsearch<CR>')
-- Window Navigation
@@ -9,16 +9,15 @@ vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower win
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Window resizing
-local resize = 2;
-vim.keymap.set('n', '<C-Left>', string.format(':vertical resize -%d<CR>', resize), { desc = "Resize Left" })
-vim.keymap.set('n', '<C-Up>', string.format(':resize -%d<CR>', resize), { desc = "Resize Up" })
-vim.keymap.set('n', '<C-Down>', string.format(':resize +%d<CR>', resize), { desc = "Resize Down" })
-vim.keymap.set('n', '<C-Right>', string.format(':vertical resize +%d<CR>', resize), { desc = "Resize Right" })
+local resize = 2
+vim.keymap.set('n', '<C-Left>', string.format(':vertical resize -%d<CR>', resize), { desc = 'Resize Left' })
+vim.keymap.set('n', '<C-Up>', string.format(':resize -%d<CR>', resize), { desc = 'Resize Up' })
+vim.keymap.set('n', '<C-Down>', string.format(':resize +%d<CR>', resize), { desc = 'Resize Down' })
+vim.keymap.set('n', '<C-Right>', string.format(':vertical resize +%d<CR>', resize), { desc = 'Resize Right' })
-- Keep selection after < and >
vim.keymap.set('v', '<', '<gv', {})
vim.keymap.set('v', '>', '>gv', {})
-- todo.lua
-vim.keymap.set('n', '<leader>ft', ':TodoTelescope<cr>', { desc = "[F]ind [T]odos" })
-
+vim.keymap.set('n', '<leader>ft', ':TodoTelescope<cr>', { desc = '[F]ind [T]odos' })
diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua
index 7dc37d8..188f24e 100644
--- a/.config/nvim/lua/options.lua
+++ b/.config/nvim/lua/options.lua
@@ -1,5 +1,5 @@
-vim.g.mapleader = " "
-vim.g.maplocalleader = " "
+vim.g.mapleader = ' '
+vim.g.maplocalleader = ' '
-- System
vim.g.have_nerd_font = true
@@ -7,10 +7,10 @@ vim.opt.mouse = 'a' -- enable mouse
vim.opt.clipboard = 'unnamedplus' -- use system clipboard
-- Tab
-vim.opt.expandtab = true -- convert tabs to spaces
-vim.opt.tabstop = 4 -- number of visual spaces per TAB
-vim.opt.softtabstop = 4 -- number of idfk tab when editing
-vim.opt.shiftwidth = 4 -- number of spaces to insert on tab
+vim.opt.expandtab = true -- convert tabs to spaces
+vim.opt.tabstop = 4 -- number of visual spaces per TAB
+vim.opt.softtabstop = 4 -- number of idfk tab when editing
+vim.opt.shiftwidth = 4 -- number of spaces to insert on tab
-- UI
vim.opt.signcolumn = 'auto'
@@ -31,4 +31,3 @@ vim.opt.smartcase = true
-- Misc
vim.opt.scrolloff = 8
vim.opt.undofile = true
-
diff --git a/.config/nvim/lua/plugin-manager.lua b/.config/nvim/lua/plugin-manager.lua
index 4b86d13..0c68d7c 100644
--- a/.config/nvim/lua/plugin-manager.lua
+++ b/.config/nvim/lua/plugin-manager.lua
@@ -1,14 +1,13 @@
-local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
- "git",
- "clone",
- "--filter=blob:none",
- "https://github.com/folke/lazy.nvim.git",
- "--branch=stable",
+ 'git',
+ 'clone',
+ '--filter=blob:none',
+ 'https://github.com/folke/lazy.nvim.git',
+ '--branch=stable',
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-require("lazy").setup("plugins")
-
+require('lazy').setup('plugins')
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index a564707..581d224 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -1 +1 @@
-return {}
+rcreturn {}
diff --git a/.config/nvim/lua/plugins/alpha.lua b/.config/nvim/lua/plugins/alpha.lua
index 9799e77..e83d8b3 100644
--- a/.config/nvim/lua/plugins/alpha.lua
+++ b/.config/nvim/lua/plugins/alpha.lua
@@ -1,32 +1,31 @@
return {
- "goolord/alpha-nvim",
- dependencies = {
- "nvim-tree/nvim-web-devicons",
- },
+ 'goolord/alpha-nvim',
+ dependencies = {
+ 'nvim-tree/nvim-web-devicons',
+ },
+ config = function()
+ local alpha = require('alpha')
+ local dashboard = require('alpha.themes.startify')
- config = function()
- local alpha = require("alpha")
- local dashboard = require("alpha.themes.startify")
+ dashboard.section.header.val = {
+ [[ ]],
+ [[ ]],
+ [[ ]],
+ [[ ]],
+ [[  ]],
+ [[ ████ ██████ █████ ██ ██ ]],
+ [[ ███████████ █████ ███ ]],
+ [[ █████████ ███████████████████ ███ ███████████ ]],
+ [[ █████████ ███ █████████████ █████ ██████████████ ]],
+ [[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
+ [[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
+ [[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
+ [[ ]],
+ [[ ]],
+ [[ ]],
+ }
- dashboard.section.header.val = {
- [[ ]],
- [[ ]],
- [[ ]],
- [[ ]],
- [[  ]],
- [[ ████ ██████ █████ ██ ██ ]],
- [[ ███████████ █████ ███ ]],
- [[ █████████ ███████████████████ ███ ███████████ ]],
- [[ █████████ ███ █████████████ █████ ██████████████ ]],
- [[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
- [[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
- [[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
- [[ ]],
- [[ ]],
- [[ ]],
- }
-
- --[=[
+ --[=[
dashboard.section.header.val = {
[[ ]],
[[ ]],
@@ -46,6 +45,6 @@ return {
}
]=]
- alpha.setup(dashboard.opts)
- end,
+ alpha.setup(dashboard.opts)
+ end,
}
diff --git a/.config/nvim/lua/plugins/catppuccin.lua b/.config/nvim/lua/plugins/catppuccin.lua
index 0b2ad91..94c9c01 100644
--- a/.config/nvim/lua/plugins/catppuccin.lua
+++ b/.config/nvim/lua/plugins/catppuccin.lua
@@ -1,9 +1,6 @@
return {
- "catppuccin/nvim",
+ 'catppuccin/nvim',
lazy = false,
- name = "catppuccin",
+ name = 'catppuccin',
priority = 1000,
- config = function()
- -- vim.cmd.colorscheme "tokyonight-night"
- end
}
diff --git a/.config/nvim/lua/plugins/comment.lua b/.config/nvim/lua/plugins/comment.lua
index 124482c..d41bad4 100644
--- a/.config/nvim/lua/plugins/comment.lua
+++ b/.config/nvim/lua/plugins/comment.lua
@@ -10,8 +10,8 @@ return {
extra = { above = 'gcO', below = 'gco', eol = 'gcA' },
mappings = {
- basic = true, -- `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
+ basic = true, -- `gcc` `gbc` `gc[count]{motion}` `gb[count]{motion}`
extra = false, -- `gco`, `gcO`, `gcA`
},
- }}
-
+ },
+}
diff --git a/.config/nvim/lua/plugins/completions.lua b/.config/nvim/lua/plugins/completions.lua
index 51b7a78..0244f1d 100644
--- a/.config/nvim/lua/plugins/completions.lua
+++ b/.config/nvim/lua/plugins/completions.lua
@@ -1,50 +1,50 @@
return {
{
- "hrsh7th/cmp-nvim-lsp"
+ 'hrsh7th/cmp-nvim-lsp',
},
{
- "L3MON4D3/LuaSnip",
+ 'L3MON4D3/LuaSnip',
dependencies = {
- "saadparwaiz1/cmp_luasnip",
- "rafamadriz/friendly-snippets"
- }
+ 'saadparwaiz1/cmp_luasnip',
+ 'rafamadriz/friendly-snippets',
+ },
},
{
- "hrsh7th/nvim-cmp",
+ 'hrsh7th/nvim-cmp',
opts = function(_, opts)
-- Setup options for lazydev.nvim
opts.sources = opts.sources or {}
table.insert(opts.sources, {
- name = "lazydev",
+ name = 'lazydev',
group_index = 0,
})
end,
config = function()
- local cmp = require("cmp")
- require("luasnip.loaders.from_vscode").lazy_load()
+ local cmp = require('cmp')
+ require('luasnip.loaders.from_vscode').lazy_load()
cmp.setup({
snippet = {
expand = function(args)
- require("luasnip").lsp_expand(args.body)
- end
+ require('luasnip').lsp_expand(args.body)
+ end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
- ["<C-b>"] = cmp.mapping.scroll_docs(-4),
- ["<C-f>"] = cmp.mapping.scroll_docs(4),
- ["<C-Space>"] = cmp.mapping.complete(),
- ["<C-e>"] = cmp.mapping.abort(),
- ["<CR>"] = cmp.mapping.confirm({ select = true}),
+ ['<C-b>'] = cmp.mapping.scroll_docs(-4),
+ ['<C-f>'] = cmp.mapping.scroll_docs(4),
+ ['<C-Space>'] = cmp.mapping.complete(),
+ ['<C-e>'] = cmp.mapping.abort(),
+ ['<CR>'] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
- { name = "nvim_lsp" },
- { name = "luasnip" },
- }, { { name = "buffer"} })
+ { name = 'nvim_lsp' },
+ { name = 'luasnip' },
+ }, { { name = 'buffer' } }),
})
- end
- }
+ end,
+ },
}
diff --git a/.config/nvim/lua/plugins/indent-blankline.lua b/.config/nvim/lua/plugins/indent-blankline.lua
index aec0a40..7130fbb 100644
--- a/.config/nvim/lua/plugins/indent-blankline.lua
+++ b/.config/nvim/lua/plugins/indent-blankline.lua
@@ -1,8 +1,8 @@
return {
- "lukas-reineke/indent-blankline.nvim",
- main = "ibl",
+ 'lukas-reineke/indent-blankline.nvim',
+ main = 'ibl',
opts = {},
- config = function ()
- require("ibl").setup()
- end
+ config = function()
+ require('ibl').setup()
+ end,
}
diff --git a/.config/nvim/lua/plugins/lazydev.lua b/.config/nvim/lua/plugins/lazydev.lua
index a073d8d..ab0de90 100644
--- a/.config/nvim/lua/plugins/lazydev.lua
+++ b/.config/nvim/lua/plugins/lazydev.lua
@@ -1,13 +1,15 @@
return {
- {
- "folke/lazydev.nvim",
- ft = "lua",
- opts = {
- library = {
- { path = "luvit-meta/library", words = { "vim%.uv" } },
- },
+ {
+ 'folke/lazydev.nvim',
+ ft = 'lua',
+ opts = {
+ library = {
+ { path = 'luvit-meta/library', words = { 'vim%.uv' } },
+ },
+ },
+ },
+ {
+ 'Bilal2453/luvit-meta',
+ lazy = true,
},
- },
- { "Bilal2453/luvit-meta", lazy = true },
- "hrsh7th/nvim-cmp",
}
diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua
index 575d69d..74b9ed4 100644
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -1,36 +1,37 @@
return {
{
- "williamboman/mason.nvim",
+ 'williamboman/mason.nvim',
+ lazy = false,
config = function()
- require("mason").setup()
- end
+ require('mason').setup()
+ end,
},
-
{
- "williamboman/mason-lspconfig.nvim",
+ 'williamboman/mason-lspconfig.nvim',
+ lazy = false,
config = function()
- require("mason-lspconfig").setup({
+ require('mason-lspconfig').setup({
ensure_installed = {
- "lua_ls",
- "clangd",
- "gradle_ls",
- "jdtls",
- "kotlin_language_server",
- "pyright",
- "rust_analyzer",
- "taplo",
- "bashls",
- "lemminx",
- "yamlls"
- }
+ 'lua_ls',
+ 'clangd',
+ 'gradle_ls',
+ 'jdtls',
+ 'kotlin_language_server',
+ 'pyright',
+ 'rust_analyzer',
+ 'taplo',
+ 'bashls',
+ 'lemminx',
+ 'yamlls',
+ },
})
- end
+ end,
},
-
{
- "neovim/nvim-lspconfig",
+ 'neovim/nvim-lspconfig',
+ lazy = false,
config = function()
- local lspconfig = require("lspconfig")
+ local lspconfig = require('lspconfig')
lspconfig.lua_ls.setup({})
lspconfig.clangd.setup({})
lspconfig.gradle_ls.setup({})
@@ -42,6 +43,6 @@ return {
lspconfig.bashls.setup({})
lspconfig.lemminx.setup({})
lspconfig.yamlls.setup({})
- end
- }
+ end,
+ },
}
diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua
index 67c517c..cd03531 100644
--- a/.config/nvim/lua/plugins/lualine.lua
+++ b/.config/nvim/lua/plugins/lualine.lua
@@ -1,10 +1,10 @@
return {
- "nvim-lualine/lualine.nvim",
+ 'nvim-lualine/lualine.nvim',
config = function()
- require("lualine").setup({
+ require('lualine').setup({
options = {
- theme = "dracula"
- }
+ theme = 'dracula',
+ },
})
- end
+ end,
}
diff --git a/.config/nvim/lua/plugins/neotree.lua b/.config/nvim/lua/plugins/neotree.lua
index 50a7b5c..df85fca 100644
--- a/.config/nvim/lua/plugins/neotree.lua
+++ b/.config/nvim/lua/plugins/neotree.lua
@@ -1,13 +1,12 @@
return {
- "nvim-neo-tree/neo-tree.nvim",
- branch = "v3.x",
+ 'nvim-neo-tree/neo-tree.nvim',
+ branch = 'v3.x',
dependencies = {
- "nvim-lua/plenary.nvim",
- "nvim-tree/nvim-web-devicons",
- "MunifTanjim/nui.nvim",
+ 'nvim-lua/plenary.nvim',
+ 'nvim-tree/nvim-web-devicons',
+ 'MunifTanjim/nui.nvim',
},
config = function()
- vim.keymap.set('n', 'gp', ':Neotree filesystem reveal left<cr>', { desc = '[F]ind Recent Files ("." for repeat)' })
- end
+ vim.keymap.set('n', 'gp', ':Neotree<CR>', { desc = '[F]ind Recent Files ("." for repeat)' })
+ end,
}
-
diff --git a/.config/nvim/lua/plugins/none-ls.lua b/.config/nvim/lua/plugins/none-ls.lua
index 0389275..3a09d95 100644
--- a/.config/nvim/lua/plugins/none-ls.lua
+++ b/.config/nvim/lua/plugins/none-ls.lua
@@ -1,12 +1,12 @@
return {
'nvimtools/none-ls.nvim',
config = function()
- local null_ls = require 'null-ls'
- null_ls.setup {
+ local null_ls = require('null-ls')
+ null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
},
- }
+ })
vim.keymap.set('n', '=', vim.lsp.buf.format, { desc = 'Format File' })
end,
diff --git a/.config/nvim/lua/plugins/smartyank.lua b/.config/nvim/lua/plugins/smartyank.lua
index cf1c8a2..d0893d2 100644
--- a/.config/nvim/lua/plugins/smartyank.lua
+++ b/.config/nvim/lua/plugins/smartyank.lua
@@ -1,4 +1,3 @@
return {
-- 'ibhagwan/smartyank.nvim'
}
-
diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua
index 91e7b31..8c0a52b 100644
--- a/.config/nvim/lua/plugins/telescope.lua
+++ b/.config/nvim/lua/plugins/telescope.lua
@@ -4,17 +4,19 @@ return {
tag = '0.1.5',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
- local builtin = require("telescope.builtin")
+ local builtin = require('telescope.builtin')
- local find_files = function ()
+ local find_files = function()
builtin.find_files({ follow = true })
end
- local grep = function (grep_func)
- return function() grep_func({ additional_args = { "--follow" } }) end
+ local grep = function(grep_func)
+ return function()
+ grep_func({ additional_args = { '--follow' } })
+ end
end
- vim.keymap.set('n', '<leader>th', builtin.colorscheme, { desc = "List [Th]eme" })
+ vim.keymap.set('n', '<leader>th', builtin.colorscheme, { desc = 'List [Th]eme' })
vim.keymap.set('n', '<leader>ff', find_files, { desc = '[F]ind [F]iles' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = '[F]ind [H]elp' })
vim.keymap.set('n', '<leader>fk', builtin.keymaps, { desc = '[F]ind [K]eymaps' })
@@ -25,29 +27,28 @@ return {
vim.keymap.set('n', '<leader>fg', grep(builtin.live_grep), { desc = '[F]ind by [G]rep' })
vim.keymap.set('n', '<leader>f.', builtin.oldfiles, { desc = '[F]ind Recent Files ("." for repeat)' })
- vim.keymap.set('n', 'gh', vim.lsp.buf.hover, { desc = "[G]oto [H]over" })
- vim.keymap.set('n', 'gd', builtin.lsp_definitions, { desc = "[G]oto [D]efinition" })
- vim.keymap.set('n', 'gu', builtin.lsp_references, { desc = "[G]oto [U]sages" })
- vim.keymap.set('n', '<leader>s', builtin.lsp_workspace_symbols, { desc = "Show [S]tructure" })
- vim.keymap.set('n', '<leader>ds', builtin.lsp_document_symbols, { desc = "Show [S]tructure" })
- vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" })
- vim.keymap.set('n', '<M-Enter>', vim.lsp.buf.code_action, { desc = "Code Actions" })
- vim.keymap.set('n', 'R', vim.lsp.buf.rename, { desc = "[R]ename" })
- end
+ vim.keymap.set('n', 'gh', vim.lsp.buf.hover, { desc = '[G]oto [H]over' })
+ vim.keymap.set('n', 'gd', builtin.lsp_definitions, { desc = '[G]oto [D]efinition' })
+ vim.keymap.set('n', 'gu', builtin.lsp_references, { desc = '[G]oto [U]sages' })
+ vim.keymap.set('n', '<leader>s', builtin.lsp_workspace_symbols, { desc = 'Show [S]tructure' })
+ vim.keymap.set('n', '<leader>ds', builtin.lsp_document_symbols, { desc = 'Show [S]tructure' })
+ vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, { desc = '[C]ode [A]ction' })
+ vim.keymap.set('n', '<M-Enter>', vim.lsp.buf.code_action, { desc = 'Code Actions' })
+ vim.keymap.set('n', 'R', vim.lsp.buf.rename, { desc = '[R]ename' })
+ end,
},
{
- "nvim-telescope/telescope-ui-select.nvim",
+ 'nvim-telescope/telescope-ui-select.nvim',
config = function()
- local telescope = require("telescope")
+ local telescope = require('telescope')
telescope.setup({
extensions = {
- ["ui_select"] = {
- require("telescope.themes").get_dropdown {}
- }
- }
+ ['ui_select'] = {
+ require('telescope.themes').get_dropdown({}),
+ },
+ },
})
- telescope.load_extension("ui-select")
- end
- }
+ telescope.load_extension('ui-select')
+ end,
+ },
}
-
diff --git a/.config/nvim/lua/plugins/todo.lua b/.config/nvim/lua/plugins/todo.lua
index d7aa3fb..98dfdc3 100644
--- a/.config/nvim/lua/plugins/todo.lua
+++ b/.config/nvim/lua/plugins/todo.lua
@@ -1,24 +1,24 @@
return {
- "folke/todo-comments.nvim",
- dependencies = { "nvim-lua/plenary.nvim" },
+ 'folke/todo-comments.nvim',
+ dependencies = { 'nvim-lua/plenary.nvim' },
opts = {
signs = false, -- show icons in the signs column
sign_priority = 8, -- sign priority
keywords = {
- FIX = { icon = " ", color = "error", alt = { "FIXME", "BUG", "ISSUE" } },
- TODO = { icon = " ", color = "info" },
- HACK = { icon = " ", color = "warning", alt = { "SMELL", "CODE SMELL", "BAD", "BAD PRACTICE" } },
- WARN = { icon = " ", color = "warning", alt = { "WARNING" } },
- PERF = { icon = " ", color = "performance", alt = { "PERFORMANCE", "OPTIMIZE" } },
- NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
- TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
+ FIX = { icon = ' ', color = 'error', alt = { 'FIXME', 'BUG', 'ISSUE' } },
+ TODO = { icon = ' ', color = 'info' },
+ HACK = { icon = ' ', color = 'warning', alt = { 'SMELL', 'CODE SMELL', 'BAD', 'BAD PRACTICE' } },
+ WARN = { icon = ' ', color = 'warning', alt = { 'WARNING' } },
+ PERF = { icon = ' ', color = 'performance', alt = { 'PERFORMANCE', 'OPTIMIZE' } },
+ NOTE = { icon = ' ', color = 'hint', alt = { 'INFO' } },
+ TEST = { icon = '⏲ ', color = 'test', alt = { 'TESTING', 'PASSED', 'FAILED' } },
--UNSAFE = { icon = "󰍛 ", color = "error", alt = { "SAFETY" } },
},
gui_style = {
- fg = "NONE",
- bg = "BOLD",
+ fg = 'NONE',
+ bg = 'BOLD',
},
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
@@ -29,11 +29,11 @@ return {
-- * after: highlights after the keyword (todo text)
highlight = {
multiline = true,
- multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
+ multiline_pattern = '^.', -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
- before = "", -- "fg" or "bg" or empty
- keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
- after = "fg", -- "fg" or "bg" or empty
+ before = '', -- "fg" or "bg" or empty
+ keyword = 'wide', -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
+ after = 'fg', -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
-- pattern = [[.*<(KEYWORDS)\s*]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true,
@@ -44,25 +44,25 @@ return {
-- list of named colors where we try to extract the gui fg from the
-- list of highlight groups or use the hex color if hl not found as a fallback
colors = {
- default = { "Identifier", "#7C3AED" },
- error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
- warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
- info = { "DiagnosticInfo", "#2563EB" },
- hint = { "DiagnosticHint", "#10B981" },
- test = { "Identifier", "#FF00FF" },
- performance = { "Identifier", "#FF00FF" },
+ default = { 'Identifier', '#7C3AED' },
+ error = { 'DiagnosticError', 'ErrorMsg', '#DC2626' },
+ warning = { 'DiagnosticWarn', 'WarningMsg', '#FBBF24' },
+ info = { 'DiagnosticInfo', '#2563EB' },
+ hint = { 'DiagnosticHint', '#10B981' },
+ test = { 'Identifier', '#FF00FF' },
+ performance = { 'Identifier', '#FF00FF' },
},
search = {
- command = "rg",
+ command = 'rg',
args = {
- "--color=never",
- "--no-heading",
- "--with-filename",
- "--line-number",
- "--column",
+ '--color=never',
+ '--no-heading',
+ '--with-filename',
+ '--line-number',
+ '--column',
-- "--hidden", -- show todos in hidden directories and files
- "--follow", -- follow symlinks
+ '--follow', -- follow symlinks
},
-- regex that will be used to match keywords.
@@ -70,5 +70,5 @@ return {
pattern = [[\b(KEYWORDS):]],
-- pattern = [[\b(KEYWORDS)\b]],
},
- }
+ },
}
diff --git a/.config/nvim/lua/plugins/tokyonight.lua b/.config/nvim/lua/plugins/tokyonight.lua
index 21a772e..b5fb899 100644
--- a/.config/nvim/lua/plugins/tokyonight.lua
+++ b/.config/nvim/lua/plugins/tokyonight.lua
@@ -1,8 +1,7 @@
-return {
+return {
'folke/tokyonight.nvim',
priority = 1000,
- config = function()
- vim.cmd.colorscheme "tokyonight-night"
- end
+ config = function()
+ vim.cmd.colorscheme('tokyonight-night')
+ end,
}
-
diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua
index 44c98c0..1fffa27 100644
--- a/.config/nvim/lua/plugins/treesitter.lua
+++ b/.config/nvim/lua/plugins/treesitter.lua
@@ -1,12 +1,12 @@
return {
'nvim-treesitter/nvim-treesitter',
- build = ":TSUpdate" ,
+ build = ':TSUpdate',
config = function()
- local config = require("nvim-treesitter.configs")
+ local config = require('nvim-treesitter.configs')
config.setup({
auto_install = true,
highlight = { enable = true },
- indent = { enable = true }
+ indent = { enable = true },
})
- end
+ end,
}
diff --git a/.config/nvim/lua/plugins/vim-tmux-navigator.lua b/.config/nvim/lua/plugins/vim-tmux-navigator.lua
index 324e958..4d5c018 100644
--- a/.config/nvim/lua/plugins/vim-tmux-navigator.lua
+++ b/.config/nvim/lua/plugins/vim-tmux-navigator.lua
@@ -1,5 +1,5 @@
return {
- "christoomey/vim-tmux-navigator",
+ 'christoomey/vim-tmux-navigator',
vim.keymap.set('n', 'C-h', ':TmuxNavigatorLeft<CR>'),
vim.keymap.set('n', 'C-j', ':TmuxNavigatorDown<CR>'),
vim.keymap.set('n', 'C-k', ':TmuxNavigatorUp<CR>'),
diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua
index 001f9ee..42eb72d 100644
--- a/.config/nvim/lua/plugins/which-key.lua
+++ b/.config/nvim/lua/plugins/which-key.lua
@@ -1,9 +1,8 @@
return {
- "folke/which-key.nvim",
- event = "VeryLazy",
+ 'folke/which-key.nvim',
+ event = 'VeryLazy',
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 500
end,
}
-
diff --git a/.config/nvim/nvim/.luarc.json b/.config/nvim/nvim/.luarc.json
deleted file mode 100644
index 1e1765c..0000000
--- a/.config/nvim/nvim/.luarc.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "diagnostics.globals": [
- "vim"
- ]
-} \ No newline at end of file
diff --git a/.config/nvim/nvim/lazy-lock.json b/.config/nvim/nvim/lazy-lock.json
deleted file mode 100644
index 031a501..0000000
--- a/.config/nvim/nvim/lazy-lock.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
- "catppuccin": { "branch": "main", "commit": "c0bea773a09e49e123136b099bce9ddc1bf395d2" },
- "lazy.nvim": { "branch": "main", "commit": "c501b429cf995c645454539b924aaefae45bb9eb" },
- "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
- "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
- "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
- "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
- "none-ls.nvim": { "branch": "main", "commit": "cc0a3c45047e3daf85d07c1571d65476cfce6480" },
- "nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" },
- "nvim-lspconfig": { "branch": "master", "commit": "bd7c76375a511994c9ca8d69441f134dc10ae3bd" },
- "nvim-treesitter": { "branch": "master", "commit": "2e9c346aefda680bd14ebf40a50c2897fd637bc2" },
- "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
- "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
- "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
- "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
- "tokyonight.nvim": { "branch": "main", "commit": "81c867c5f638597a82c82094dcb90ed42444dabc" }
-} \ No newline at end of file
diff --git a/.config/nvim/nvim/nvim b/.config/nvim/nvim/nvim
deleted file mode 120000
index ae85021..0000000
--- a/.config/nvim/nvim/nvim
+++ /dev/null
@@ -1 +0,0 @@
-../../dotfiles/.config/nvim/nvim \ No newline at end of file
diff --git a/.config/nvim/nvim/stylua.toml b/.config/nvim/nvim/stylua.toml
deleted file mode 100644
index 7ff2043..0000000
--- a/.config/nvim/nvim/stylua.toml
+++ /dev/null
@@ -1,6 +0,0 @@
-column_width = 120
-line_endings = "Unix"
-indent_type = "Spaces"
-indent_width = 4
-quote_style = "AutoPreferSingle"
-call_parentheses = "None"
diff --git a/.config/nvim/stylua.toml b/.config/nvim/stylua.toml
index 7ff2043..928d5b6 100644
--- a/.config/nvim/stylua.toml
+++ b/.config/nvim/stylua.toml
@@ -3,4 +3,6 @@ line_endings = "Unix"
indent_type = "Spaces"
indent_width = 4
quote_style = "AutoPreferSingle"
-call_parentheses = "None"
+call_parentheses = "Always"
+collapse_simple_statement = "Never"
+