feat: bust up the project, refresh upstream
This commit is contained in:
parent
a3cd76746c
commit
2079778b89
47 changed files with 1446 additions and 1205 deletions
13
lua/killtheliterate/keymaps.lua
Normal file
13
lua/killtheliterate/keymaps.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-- prev/next tab
|
||||
vim.keymap.set('n', 'H', 'gT', { desc = 'Tab Left' })
|
||||
vim.keymap.set('n', 'L', 'gt', { desc = 'Tab Right' })
|
||||
|
||||
-- line bubbling
|
||||
vim.keymap.set('n', '<C-j>', ':m .+1<CR>==', { noremap = true, desc = 'Bubble Down' })
|
||||
vim.keymap.set('n', '<C-k>', ':m .-2<CR>==', { noremap = true, desc = 'Bubble Up' }) -- conflicts with "signature help" from LSP
|
||||
vim.keymap.set('v', '<C-k>', ":m '<-2<CR>gv=gv", { noremap = true, desc = 'Bubble Down' })
|
||||
vim.keymap.set('v', '<C-j>', ":m '>+1<CR>gv=gv", { noremap = true, desc = 'Bubble Up' })
|
||||
|
||||
vim.keymap.set('n', '<leader>c', ':nohlsearch<CR>', { noremap = true, silent = true, desc = 'Clear search highlight' })
|
||||
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
36
lua/killtheliterate/misc.lua
Normal file
36
lua/killtheliterate/misc.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
-- Open file in vscode, for WCA and GPT stuff
|
||||
vim.api.nvim_create_user_command('OpenInVSCode', function()
|
||||
-- Using vim.fn.expand('%') to get the current file path
|
||||
local filepath = vim.fn.expand '%:p' -- ':p' expands to full path
|
||||
-- The command to open VS Code with the current file
|
||||
os.execute('code ' .. filepath)
|
||||
end, { desc = 'Open the current file in Visual Studio Code' })
|
||||
|
||||
vim.diagnostic.config {
|
||||
severity_sort = true,
|
||||
virtual_text = {
|
||||
source = false,
|
||||
prefix = '●',
|
||||
format = function()
|
||||
return ''
|
||||
end,
|
||||
},
|
||||
float = {
|
||||
source = 'if_many',
|
||||
format = function(diagnostic)
|
||||
if diagnostic.source == 'eslint' then
|
||||
return string.format('%s [%s]', diagnostic.message, diagnostic.user_data.lsp.code)
|
||||
end
|
||||
|
||||
return string.format('%s [%s]', diagnostic.message, diagnostic.source)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
local signs = { Error = '✗', Warn = '⚠', Hint = '➤', Info = 'i' }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = 'DiagnosticSign' .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
19
lua/killtheliterate/options.lua
Normal file
19
lua/killtheliterate/options.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
local set = vim.opt
|
||||
|
||||
set.colorcolumn = '80,120'
|
||||
set.cursorline = true
|
||||
set.expandtab = true
|
||||
set.list = true
|
||||
set.shiftwidth = 2
|
||||
set.splitbelow = true
|
||||
set.splitright = true
|
||||
set.swapfile = false
|
||||
set.tabstop = 2
|
||||
set.textwidth = 80
|
||||
set.wrap = false
|
||||
set.writebackup = false
|
||||
|
||||
vim.o.inccommand = 'nosplit'
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
|
||||
-- vim: ts=2 sts=2 sw=2 et
|
||||
14
lua/killtheliterate/plugins/autopairs.lua
Normal file
14
lua/killtheliterate/plugins/autopairs.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
lazy = true,
|
||||
config = function()
|
||||
require("nvim-autopairs").setup {}
|
||||
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local cmp = require('cmp')
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
cmp_autopairs.on_confirm_done()
|
||||
)
|
||||
end,
|
||||
}
|
||||
10
lua/killtheliterate/plugins/base16.lua
Normal file
10
lua/killtheliterate/plugins/base16.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
'norcalli/nvim-base16.lua',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local base16 = require 'base16'
|
||||
|
||||
base16(base16.themes[vim.env.BASE16_THEME or "3024"], true)
|
||||
end,
|
||||
}
|
||||
4
lua/killtheliterate/plugins/dirvish.lua
Normal file
4
lua/killtheliterate/plugins/dirvish.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
"kristijanhusak/vim-dirvish-git",
|
||||
dependencies = { "justinmk/vim-dirvish" },
|
||||
}
|
||||
25
lua/killtheliterate/plugins/hop.lua
Normal file
25
lua/killtheliterate/plugins/hop.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
'phaazon/hop.nvim',
|
||||
cond = false,
|
||||
branch = 'v2',
|
||||
config = function()
|
||||
local hop = require('hop')
|
||||
local directions = require('hop.hint').HintDirection
|
||||
|
||||
hop.setup {}
|
||||
|
||||
vim.keymap.set(
|
||||
'',
|
||||
'<leader>h',
|
||||
function() hop.hint_char1({ direction = directions.AFTER_CURSOR }) end,
|
||||
{ remap = true, desc = '[H]opChar1 forwards' }
|
||||
)
|
||||
|
||||
vim.keymap.set(
|
||||
'',
|
||||
'<leader>H',
|
||||
function() hop.hint_char1({ direction = directions.BEFORE_CURSOR }) end,
|
||||
{ remap = true, desc = '[H]opChar1 backwards' }
|
||||
)
|
||||
end
|
||||
}
|
||||
9
lua/killtheliterate/plugins/indent_line.lua
Normal file
9
lua/killtheliterate/plugins/indent_line.lua
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
return {
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
main = 'ibl',
|
||||
opts = {
|
||||
debounce = 100,
|
||||
indent = { char = '┊' },
|
||||
whitespace = { highlight = { 'Whitespace', 'NonText' } },
|
||||
},
|
||||
}
|
||||
7
lua/killtheliterate/plugins/leap.lua
Normal file
7
lua/killtheliterate/plugins/leap.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'ggandor/leap.nvim',
|
||||
dependencies = { "tpope/vim-repeat" },
|
||||
config = function()
|
||||
require('leap').add_default_mappings()
|
||||
end
|
||||
}
|
||||
8
lua/killtheliterate/plugins/neogen.lua
Normal file
8
lua/killtheliterate/plugins/neogen.lua
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
return {
|
||||
"danymat/neogen",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require('neogen').setup {}
|
||||
vim.keymap.set('n', '<leader>nf', ":Neogen func<CR>", { noremap = true, desc = '[D]ocument [F]unction' })
|
||||
end,
|
||||
}
|
||||
23
lua/killtheliterate/plugins/null_ls.lua
Normal file
23
lua/killtheliterate/plugins/null_ls.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvimtools/none-ls-extras.nvim",
|
||||
},
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.diagnostics.codespell,
|
||||
-- require("none-ls.diagnostics.eslint_d").with({
|
||||
-- method = null_ls.methods.DIAGNOSTICS_ON_SAVE,
|
||||
-- }),
|
||||
null_ls.builtins.diagnostics.stylelint.with({
|
||||
filetypes = { "scss", "css" },
|
||||
}),
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
||||
7
lua/killtheliterate/plugins/reveal.lua
Normal file
7
lua/killtheliterate/plugins/reveal.lua
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
"killtheliterate/nvim-reveal",
|
||||
dev = false,
|
||||
config = function()
|
||||
require('nvim-reveal').setup {}
|
||||
end
|
||||
}
|
||||
34
lua/killtheliterate/plugins/treesitter.lua
Normal file
34
lua/killtheliterate/plugins/treesitter.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
'JoosepAlviste/nvim-ts-context-commentstring',
|
||||
},
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {
|
||||
'css',
|
||||
'html',
|
||||
'javascript',
|
||||
'json',
|
||||
'lua',
|
||||
'python',
|
||||
'scss',
|
||||
'svelte',
|
||||
'tsx',
|
||||
'typescript',
|
||||
'vim',
|
||||
},
|
||||
}
|
||||
|
||||
require('ts_context_commentstring').setup {
|
||||
}
|
||||
|
||||
require('Comment').setup {
|
||||
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
|
||||
}
|
||||
|
||||
vim.g.skip_ts_context_commentstring_module = true
|
||||
end
|
||||
}
|
||||
33
lua/killtheliterate/plugins/trouble.lua
Normal file
33
lua/killtheliterate/plugins/trouble.lua
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
return {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("trouble").setup {}
|
||||
|
||||
vim.keymap.set("n", "<leader>xx", "<cmd>TroubleToggle<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "gR", "<cmd>TroubleToggle lsp_references<cr>",
|
||||
{ silent = true, noremap = true }
|
||||
)
|
||||
end
|
||||
}
|
||||
4
lua/killtheliterate/plugins/web-devicons.lua
Normal file
4
lua/killtheliterate/plugins/web-devicons.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
lazy = true
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue