mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
chore(vim): rename plugin configuration folder
This commit is contained in:
9
nvim/plugin-config/autopairs.lua
Normal file
9
nvim/plugin-config/autopairs.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- nvim-autopairs
|
||||
-- https://github.com/windwp/nvim-autopairs
|
||||
|
||||
local status, autopairs = pcall(require, 'nvim-autopairs')
|
||||
if (not status) then return end
|
||||
|
||||
autopairs.setup({
|
||||
disable_filetype = { 'TelescopePrompt', 'vim' },
|
||||
})
|
||||
7
nvim/plugin-config/base16.vim
Normal file
7
nvim/plugin-config/base16.vim
Normal file
@@ -0,0 +1,7 @@
|
||||
" Base16 Vim
|
||||
" https://github.com/chriskempson/base16-vim
|
||||
|
||||
if filereadable(expand("~/.vimrc_background"))
|
||||
let base16colorspace=256
|
||||
source ~/.vimrc_background
|
||||
endif
|
||||
9
nvim/plugin-config/blamer.vim
Normal file
9
nvim/plugin-config/blamer.vim
Normal file
@@ -0,0 +1,9 @@
|
||||
" blamer.vim
|
||||
" https://github.com/APZelos/blamer.nvim
|
||||
|
||||
" Settings
|
||||
let g:blamer_enabled = 0
|
||||
let g:blamer_relative_time = 1
|
||||
|
||||
" Mappings
|
||||
nnoremap <silent> <Leader>tb :BlamerToggle<CR>
|
||||
5
nvim/plugin-config/bookmarks.vim
Normal file
5
nvim/plugin-config/bookmarks.vim
Normal file
@@ -0,0 +1,5 @@
|
||||
" vim-bookmarks
|
||||
" https://github.com/MattesGroeger/vim-bookmarks
|
||||
|
||||
let g:bookmark_center = 1
|
||||
let g:bookmark_auto_close = 1
|
||||
55
nvim/plugin-config/bufferline.lua
Normal file
55
nvim/plugin-config/bufferline.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
-- bufferline.nvim
|
||||
-- https://github.com/akinsho/bufferline.nvim
|
||||
|
||||
local status, bufferline = pcall(require, 'bufferline')
|
||||
if (not status) then return end
|
||||
|
||||
bufferline.setup({
|
||||
highlights = {
|
||||
fill = {
|
||||
guibg = "#282828"
|
||||
},
|
||||
separator_selected = {
|
||||
guifg = "#282828"
|
||||
},
|
||||
separator_visible = {
|
||||
guifg = "#282828"
|
||||
},
|
||||
separator = {
|
||||
guifg = "#282828"
|
||||
}
|
||||
},
|
||||
options = {
|
||||
modified_icon = "●",
|
||||
left_trunc_marker = "",
|
||||
right_trunc_marker = "",
|
||||
max_name_length = 25,
|
||||
max_prefix_length = 25,
|
||||
enforce_regular_tabs = false,
|
||||
view = "multiwindow",
|
||||
show_buffer_close_icons = true,
|
||||
show_close_icon = false,
|
||||
separator_style = "slant",
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_update_in_insert = false,
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
return "("..count..")"
|
||||
end,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = "File Explorer",
|
||||
highlight = "Directory",
|
||||
text_align = "left"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
-- Mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<Leader>tp', [[<Cmd>:BufferLinePick<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>tx', [[<Cmd>:BufferLinePickClose<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>H', [[<Cmd>:BufferLineCyclePrev<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>L', [[<Cmd>:BufferLineCycleNext<CR>]], opts)
|
||||
51
nvim/plugin-config/cmp.lua
Normal file
51
nvim/plugin-config/cmp.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
-- nvim-cmp
|
||||
-- https://github.com/hrsh7th/nvim-cmp
|
||||
|
||||
local status, cmp = pcall(require, 'cmp')
|
||||
if (not status) then return end
|
||||
|
||||
cmp.setup({
|
||||
auto_select = false,
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["UltiSnips#Anon"](args.body)
|
||||
end
|
||||
},
|
||||
mapping = {
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-x>'] = cmp.mapping.complete(),
|
||||
['<C-y>'] = cmp.config.disable,
|
||||
['<C-e>'] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
['<CR>'] = cmp.mapping({
|
||||
i = cmp.mapping.confirm({ select = true }),
|
||||
c = cmp.mapping.confirm({ select = false }),
|
||||
}),
|
||||
},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
{ name = 'ultisnips' },
|
||||
{ name = 'buffer', keyword_length = 5 },
|
||||
{ name = 'npm', keyword_length = 4 },
|
||||
},
|
||||
formatting = {
|
||||
format = require('lspkind').cmp_format {
|
||||
with_text = true,
|
||||
menu = {
|
||||
buffer = "[buf]",
|
||||
nvim_lsp = "[LSP]",
|
||||
path = "[path]",
|
||||
luasnip = "[snip]"
|
||||
}
|
||||
}
|
||||
},
|
||||
experimental = {
|
||||
native_menu = false,
|
||||
ghost_text = true
|
||||
}
|
||||
})
|
||||
17
nvim/plugin-config/colorizer.lua
Normal file
17
nvim/plugin-config/colorizer.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
-- colorizer.lua
|
||||
-- https://github.com/norcalli/nvim-colorizer.lua
|
||||
|
||||
local status, colorizer = pcall(require, 'colorizer')
|
||||
if (not status) then return end
|
||||
|
||||
colorizer.setup(nil, {
|
||||
RGB = true, -- #RGB hex codes
|
||||
RRGGBB = true, -- #RRGGBB hex codes
|
||||
names = true, -- "Name" codes like Blue
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
mode = "background", -- Set the display mode.)
|
||||
})
|
||||
12
nvim/plugin-config/dashboard.vim
Normal file
12
nvim/plugin-config/dashboard.vim
Normal file
@@ -0,0 +1,12 @@
|
||||
" Dashboard
|
||||
" https://github.com/glepnir/dashboard-nvim
|
||||
|
||||
let g:dashboard_default_executive = 'telescope'
|
||||
let g:dashboard_custom_header = [
|
||||
\ ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗',
|
||||
\ ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║',
|
||||
\ ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║',
|
||||
\ ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║',
|
||||
\ ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║',
|
||||
\ ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝',
|
||||
\]
|
||||
53
nvim/plugin-config/diagnosticls-configs.lua
Normal file
53
nvim/plugin-config/diagnosticls-configs.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
-- diagnosticls-configs-nvim
|
||||
-- https://github.com/creativenull/diagnosticls-configs-nvim#setup
|
||||
|
||||
local status, dlsconfig = pcall(require, 'diagnosticls-configs')
|
||||
if (not status) then return end
|
||||
|
||||
-- npm install -g diagnostic-languageserver eslint_d prettier_d_slim prettier
|
||||
local eslint = require('diagnosticls-configs.linters.eslint')
|
||||
local standard = require('diagnosticls-configs.linters.standard')
|
||||
local prettier = require('diagnosticls-configs.formatters.prettier')
|
||||
local prettier_standard = require('diagnosticls-configs.formatters.prettier_standard')
|
||||
|
||||
local function on_attach(client)
|
||||
print('Attached to ' .. client.name)
|
||||
end
|
||||
|
||||
dlsconfig.init({
|
||||
default_config = true,
|
||||
format = true,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
prettier.requiredFiles = {
|
||||
'.prettierrc',
|
||||
'.prettierrc.json',
|
||||
'.prettierrc.toml',
|
||||
'.prettierrc.json',
|
||||
'.prettierrc.yml',
|
||||
'.prettierrc.yaml',
|
||||
'.prettierrc.json5',
|
||||
'.prettierrc.js',
|
||||
'.prettierrc.cjs',
|
||||
'prettier.config.js',
|
||||
'prettier.config.cjs',
|
||||
}
|
||||
|
||||
dlsconfig.setup({
|
||||
['javascript'] = {
|
||||
linter = { eslint, standard },
|
||||
formatter = { prettier, prettier_standard },
|
||||
},
|
||||
['javascriptreact'] = {
|
||||
linter = { eslint, standard },
|
||||
formatter = { prettier, prettier_standard }
|
||||
},
|
||||
['css'] = {
|
||||
formatter = prettier
|
||||
},
|
||||
['html'] = {
|
||||
formatter = prettier
|
||||
},
|
||||
})
|
||||
|
||||
7
nvim/plugin-config/gitsigns.lua
Normal file
7
nvim/plugin-config/gitsigns.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- gitsigns.nvim
|
||||
-- https://github.com/lewis6991/gitsigns.nvim
|
||||
|
||||
local status, gitsigns = pcall(require, 'gitsigns')
|
||||
if (not status) then return end
|
||||
|
||||
gitsigns.setup()
|
||||
30
nvim/plugin-config/goyo.vim
Normal file
30
nvim/plugin-config/goyo.vim
Normal file
@@ -0,0 +1,30 @@
|
||||
" Goyo
|
||||
" https://github.com/junegunn/goyo.vim
|
||||
|
||||
function! s:goyo_enter()
|
||||
if executable('tmux') && strlen($TMUX)
|
||||
silent !tmux set status off
|
||||
silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
|
||||
endif
|
||||
set noshowmode
|
||||
set noshowcmd
|
||||
set scrolloff=999
|
||||
Gitsigns toggle_signs
|
||||
endfunction
|
||||
|
||||
function! s:goyo_leave()
|
||||
if executable('tmux') && strlen($TMUX)
|
||||
silent !tmux set status on
|
||||
silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
|
||||
endif
|
||||
set showmode
|
||||
set showcmd
|
||||
set scrolloff=8
|
||||
Gitsigns toggle_signs
|
||||
endfunction
|
||||
|
||||
autocmd! User GoyoEnter nested call <SID>goyo_enter()
|
||||
autocmd! User GoyoLeave nested call <SID>goyo_leave()
|
||||
|
||||
" Mappings
|
||||
noremap <leader>z :Goyo<CR>
|
||||
17
nvim/plugin-config/harpoon.lua
Normal file
17
nvim/plugin-config/harpoon.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
-- Harpoon
|
||||
-- https://github.com/ThePrimeagen/harpoon
|
||||
|
||||
local status, harpoon = pcall(require, 'harpoon')
|
||||
if (not status) then return end
|
||||
|
||||
harpoon.setup()
|
||||
|
||||
-- Mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader>a', [[<Cmd>lua require('harpoon.mark').add_file()<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>,', [[<Cmd>lua require('harpoon.ui').toggle_quick_menu()<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>1', [[<Cmd>lua require('harpoon.ui').nav_file(1)<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>2', [[<Cmd>lua require('harpoon.ui').nav_file(2)<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>3', [[<Cmd>lua require('harpoon.ui').nav_file(3)<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>4', [[<Cmd>lua require('harpoon.ui').nav_file(4)<CR>]], opts)
|
||||
23
nvim/plugin-config/lsp-config.lua
Normal file
23
nvim/plugin-config/lsp-config.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
-- lspconfig
|
||||
-- https://github.com/neovim/nvim-lspconfig
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.api.nvim_set_keymap('n', 'gD', [['<Cmd>lua vim.lsp.buf.declaration()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', 'gd', [['<Cmd>lua vim.lsp.buf.definition()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', 'K', [['<Cmd>lua vim.lsp.buf.hover()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', 'gi', [['<cmd>lua vim.lsp.buf.implementation()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', '<C-k>', [['<cmd>lua vim.lsp.buf.signature_help()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>wa', [['<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>wr', [['<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>wl', [['<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>D', [['<cmd>lua vim.lsp.buf.type_definition()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>rn', [['<cmd>lua vim.lsp.buf.rename()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', 'gr', [['<cmd>lua vim.lsp.buf.references()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>e', [['<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', 'Ä', [['<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', 'ä', [['<cmd>lua vim.lsp.diagnostic.goto_next()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', '<leader>q', [['<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>']], opts)
|
||||
vim.api.nvim_set_keymap('n', 'g0', [[<Cmd>lua vim.lsp.buf.document_symbol()<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', 'gW', [[<Cmd>lua vim.lsp.buf.workspace_symbol()<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', 'ga', [[<Cmd>lua vim.lsp.buf.code_action()<CR>]], opts)
|
||||
78
nvim/plugin-config/lsp-installer.lua
Normal file
78
nvim/plugin-config/lsp-installer.lua
Normal file
@@ -0,0 +1,78 @@
|
||||
-- nvim-lsp-installer
|
||||
-- https://github.com/williamboman/nvim-lsp-installer
|
||||
|
||||
local status, lsp_installer = pcall(require, 'nvim-lsp-installer')
|
||||
if (not status) then return end
|
||||
|
||||
local servers = {
|
||||
bashls = {},
|
||||
cssls = {},
|
||||
diagnosticls = {},
|
||||
dockerls = {},
|
||||
emmet_ls = {},
|
||||
eslint = {},
|
||||
graphql = {},
|
||||
html = {},
|
||||
jsonls = {},
|
||||
pyright = {},
|
||||
sumneko_lua = {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = {"vim"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
stylelint_lsp = {},
|
||||
svelte = {},
|
||||
tailwindcss = {},
|
||||
tsserver = {},
|
||||
vimls = {},
|
||||
vuels = {},
|
||||
yamlls = {},
|
||||
}
|
||||
|
||||
lsp_installer.settings({
|
||||
ui = {
|
||||
icons = {
|
||||
server_installed = "✓",
|
||||
server_pending = "➜",
|
||||
server_uninstalled = "✗"
|
||||
},
|
||||
},
|
||||
|
||||
max_concurrent_installers = 4,
|
||||
})
|
||||
|
||||
-- Register a handler that will be called for all installed servers.
|
||||
lsp_installer.on_server_ready(function(server)
|
||||
local opts = {
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
}
|
||||
|
||||
if servers[server.name] then
|
||||
opts = servers[server.name]
|
||||
end
|
||||
|
||||
-- This setup() function is exactly the same as lspconfig's setup function.
|
||||
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
server:setup(opts)
|
||||
|
||||
vim.cmd([[do User LspAttachBuffers]])
|
||||
end)
|
||||
|
||||
--- Global function to install servers automatically
|
||||
function _G.lsp_install_sync()
|
||||
local lsp_installer_servers = require("nvim-lsp-installer.servers")
|
||||
|
||||
local requested = {}
|
||||
for server_name, _ in pairs(servers) do
|
||||
local ok, server = lsp_installer_servers.get_server(server_name)
|
||||
if ok and not server:is_installed() then
|
||||
table.insert(requested, server_name)
|
||||
end
|
||||
end
|
||||
|
||||
lsp_installer.install_sync(requested)
|
||||
end
|
||||
7
nvim/plugin-config/lspkind.lua
Normal file
7
nvim/plugin-config/lspkind.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- lspkind-nvim
|
||||
-- https://github.com/onsails/lspkind-nvim
|
||||
|
||||
local status, lspkind = pcall(require, 'lspkind')
|
||||
if (not status) then return end
|
||||
|
||||
lspkind.init({})
|
||||
7
nvim/plugin-config/lualine.lua
Normal file
7
nvim/plugin-config/lualine.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- lualine.nvim
|
||||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
|
||||
local status, lualine = pcall(require, 'lualine')
|
||||
if (not status) then return end
|
||||
|
||||
lualine.setup()
|
||||
7
nvim/plugin-config/neoscroll.lua
Normal file
7
nvim/plugin-config/neoscroll.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Neoscroll
|
||||
-- https://github.com/karb94/neoscroll.nvim
|
||||
|
||||
local status, neoscroll = pcall(require, 'neoscroll')
|
||||
if (not status) then return end
|
||||
|
||||
neoscroll.setup()
|
||||
6
nvim/plugin-config/pandoc.vim
Normal file
6
nvim/plugin-config/pandoc.vim
Normal file
@@ -0,0 +1,6 @@
|
||||
" vim-pandoc
|
||||
" https://github.com/vim-pandoc/vim-pandoc
|
||||
|
||||
let g:pandoc#modules#disabled = ["folding", "chdir"]
|
||||
let g:pandoc#spell#default_langs = ['de_de', 'en_us']
|
||||
let g:pandoc#spell#enabled = 0
|
||||
18
nvim/plugin-config/prettier.vim
Normal file
18
nvim/plugin-config/prettier.vim
Normal file
@@ -0,0 +1,18 @@
|
||||
" Settings
|
||||
let g:prettier#autoformat = 1
|
||||
let g:prettier#autoformat_require_pragma = 0
|
||||
let g:prettier#exec_cmd_async = 1
|
||||
let g:prettier#exec_cmd_path = "/usr/local/bin/prettier"
|
||||
|
||||
" Autocommands
|
||||
augroup prettier
|
||||
autocmd!
|
||||
autocmd FileType css,scss let b:prettier_exec_cmd = 'prettier-stylelint'
|
||||
autocmd BufWritePre *.js PrettierAsync
|
||||
autocmd BufWritePre *.jsx PrettierAsync
|
||||
autocmd BufWritePre *.ts PrettierAsync
|
||||
autocmd BufWritePre *.tsx PrettierAsync
|
||||
autocmd BufWritePre *.css PrettierAsync
|
||||
autocmd BufWritePre *.scss PrettierAsync
|
||||
autocmd BufWritePre *.md PrettierAsync
|
||||
augroup END
|
||||
9
nvim/plugin-config/sidebar.lua
Normal file
9
nvim/plugin-config/sidebar.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local status, sidebar = pcall(require, 'sidebar-nvim')
|
||||
if (not status) then return end
|
||||
|
||||
sidebar.setup()
|
||||
|
||||
--- Mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader>ts', [[<Cmd>:SidebarNvimToggle<CR>]], opts)
|
||||
4
nvim/plugin-config/speeddating.vim
Normal file
4
nvim/plugin-config/speeddating.vim
Normal file
@@ -0,0 +1,4 @@
|
||||
" speeddating.vim
|
||||
" https://github.com/tpope/vim-speeddating
|
||||
|
||||
autocmd VimEnter * SpeedDatingFormat %d.%m.%Y
|
||||
85
nvim/plugin-config/telescope.lua
Normal file
85
nvim/plugin-config/telescope.lua
Normal file
@@ -0,0 +1,85 @@
|
||||
-- telescope.nvim
|
||||
-- https://github.com/nvim-telescope/telescope.nvim/
|
||||
|
||||
local status, telescope = pcall(require, 'telescope')
|
||||
if (not status) then return end
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
file_ignore_pattern = { 'yarn.lock' }
|
||||
},
|
||||
extensions = {
|
||||
lsp_handlers = {
|
||||
disable = {},
|
||||
location = {
|
||||
telescope = {},
|
||||
no_results_message = 'No references found',
|
||||
},
|
||||
symbol = {
|
||||
telescope = {},
|
||||
no_results_message = 'No symbols found',
|
||||
},
|
||||
call_hierarchy = {
|
||||
telescope = {},
|
||||
no_results_message = 'No calls found',
|
||||
},
|
||||
code_action = {
|
||||
telescope = require('telescope.themes').get_dropdown({}),
|
||||
no_results_message = 'No code actions available',
|
||||
prefix = '',
|
||||
},
|
||||
},
|
||||
bookmarks = {
|
||||
selected_browser = 'brave',
|
||||
url_open_command = 'open',
|
||||
}
|
||||
},
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = false,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case"
|
||||
},
|
||||
buffers = {
|
||||
show_all_buffers = true,
|
||||
sort_lastused = true,
|
||||
-- theme = "dropdown",
|
||||
-- previewer = false,
|
||||
mappings = {
|
||||
i = {
|
||||
["<M-d>"] = "delete_buffer",
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
--- Extensions
|
||||
require('telescope').load_extension('bookmarks')
|
||||
require('telescope').load_extension('frecency')
|
||||
require('telescope').load_extension('fzf')
|
||||
require('telescope').load_extension('harpoon')
|
||||
require('telescope').load_extension('lsp_handlers')
|
||||
require('telescope').load_extension('node_modules')
|
||||
|
||||
--- Mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<C-p>', [[<Cmd>Telescope find_files<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>b', [[<Cmd>Telescope buffers<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>bh', [[<Cmd>Telescope bookmarks<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>cheat', [[<Cmd>:Cheatsheet<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>fb', [[<Cmd>Telescope buffers<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>fc', [[<Cmd>Telescope git_status<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>fcb', [[<Cmd>Telescope git_branches<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>ff', [[<Cmd>lua require('telescope.builtin').find_files({ hidden = true })<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>fht', [[<Cmd>Telescope help_tags<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>fnm', [[<Cmd>Telescope node_modules list<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>fr', [[<Cmd>Telescope resume<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>frg', [[<Cmd>Telescope live_grep<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>fs', [[<Cmd>lua require('telescope.builtin').file_browser({ cwd = vim.fn.expand('%:p:h') })<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>ft', [[<Cmd>Telescope tags<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>m', [[<Cmd>Telescope marks<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>mru', [[<Cmd>Telescope frecency<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>ps', [[<Cmd>lua require('telescope.builtin').grep_string({ search = vim.fn.input('Grep for > ') })<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>r', [[<Cmd>Telescope live_grep<CR>]], opts)
|
||||
vim.api.nvim_set_keymap('n', '<Leader>t', [[<Cmd>Telescope tags<CR>]], opts)
|
||||
12
nvim/plugin-config/tree.lua
Normal file
12
nvim/plugin-config/tree.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
-- nvim-tree.lua
|
||||
-- https://github.com/kyazdani42/nvim-tree.lua
|
||||
|
||||
local status, nvim_tree = pcall(require, 'nvim-tree')
|
||||
if (not status) then return end
|
||||
|
||||
nvim_tree.setup({})
|
||||
|
||||
--- Mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader>nt', [[<Cmd>:NvimTreeToggle<CR>]], opts)
|
||||
41
nvim/plugin-config/treesitter.lua
Normal file
41
nvim/plugin-config/treesitter.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
-- nvim-treesitter
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter
|
||||
|
||||
local status, treesitter = pcall(require, 'nvim-treesitter')
|
||||
if (not status) then return end
|
||||
|
||||
treesitter.setup {
|
||||
ensure_installed = {
|
||||
'bash',
|
||||
'css',
|
||||
'dockerfile',
|
||||
'graphql',
|
||||
'html',
|
||||
'javascript',
|
||||
'jsdoc',
|
||||
'json',
|
||||
'lua',
|
||||
'python',
|
||||
'ruby',
|
||||
'scss',
|
||||
'svelte',
|
||||
'toml',
|
||||
'tsx',
|
||||
'typescript',
|
||||
'vim',
|
||||
'vue',
|
||||
'yaml',
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
additional_vim_regex_highlighting = true
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
disable = {},
|
||||
},
|
||||
context_commentstring = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
12
nvim/plugin-config/trouble.lua
Normal file
12
nvim/plugin-config/trouble.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Trouble
|
||||
-- https://github.com/folke/trouble.nvim
|
||||
|
||||
local status, trouble = pcall(require, 'trouble')
|
||||
if (not status) then return end
|
||||
|
||||
trouble.setup()
|
||||
|
||||
--- Mappings
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader>tt', [[<Cmd>:TroubleToggle<CR>]], opts)
|
||||
13
nvim/plugin-config/ultisnips.vim
Normal file
13
nvim/plugin-config/ultisnips.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" UltiSnips
|
||||
" https://github.com/SirVer/ultisnips
|
||||
|
||||
let g:UltiSnipsSnippetDirectories = ["ultisnips"]
|
||||
let g:UltiSnipsExpandTrigger="<tab>"
|
||||
let g:UltiSnipsJumpForwardTrigger="<c-j>"
|
||||
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
|
||||
let g:UltiSnipsEditSplit="vertical"
|
||||
let g:ultisnips_javascript = {
|
||||
\ 'keyword-spacing': 'always',
|
||||
\ 'semi': 'always',
|
||||
\ 'space-before-function-paren': 'never'
|
||||
\ }
|
||||
10
nvim/plugin-config/vim-easymotion.vim
Normal file
10
nvim/plugin-config/vim-easymotion.vim
Normal file
@@ -0,0 +1,10 @@
|
||||
" vim-easymotion
|
||||
" https://github.com/easymotion/vim-easymotion
|
||||
|
||||
" <Leader>f{char} to move to {char}
|
||||
map <Leader>f <Plug>(easymotion-bd-f)
|
||||
nmap <Leader>f <Plug>(easymotion-overwin-f)
|
||||
|
||||
" Move to line
|
||||
map <Leader>L <Plug>(easymotion-bd-jk)
|
||||
nmap <Leader>L <Plug>(easymotion-overwin-line)
|
||||
14
nvim/plugin-config/vimux.vim
Normal file
14
nvim/plugin-config/vimux.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vimux
|
||||
" https://github.com/preservim/vimux
|
||||
|
||||
let g:VimuxHeight = "30"
|
||||
let g:VimuxOrientation = 'h'
|
||||
let g:VimuxUseNearestPane = 0
|
||||
|
||||
" Mappings
|
||||
nmap <leader>vt :VimuxTogglePane<CR>
|
||||
nmap <leader>vp :VimuxPromptCommand<CR>
|
||||
nmap <leader>vl :VimuxRunLastCommand<CR>
|
||||
nmap <leader>vj :RunJest<CR>
|
||||
nmap <leader>vjb :RunJestOnBuffer<CR>
|
||||
nmap <leader>vjf :RunJestFocused<CR>
|
||||
10
nvim/plugin-config/web-devicons.lua
Normal file
10
nvim/plugin-config/web-devicons.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- nvim-web-devicons
|
||||
-- https://github.com/kyazdani42/nvim-web-devicons
|
||||
|
||||
local status, web_devicons = pcall(require, 'nvim-web-devicons')
|
||||
if (not status) then return end
|
||||
|
||||
web_devicons.setup({
|
||||
override = {},
|
||||
default = true,
|
||||
})
|
||||
Reference in New Issue
Block a user