add hlargs and shade
parent
6e4b9d5a71
commit
e5ecfa32da
|
@ -92,20 +92,33 @@ Plug('ThePrimeagen/harpoon') -- 1-click through marked files per project
|
||||||
Plug('gruvbox-community/gruvbox')
|
Plug('gruvbox-community/gruvbox')
|
||||||
Plug('nvim-lualine/lualine.nvim') -- fancy status line
|
Plug('nvim-lualine/lualine.nvim') -- fancy status line
|
||||||
Plug('lukas-reineke/indent-blankline.nvim') -- identation lines on blank lines
|
Plug('lukas-reineke/indent-blankline.nvim') -- identation lines on blank lines
|
||||||
|
Plug('sunjon/shade.nvim')
|
||||||
|
|
||||||
-- other
|
-- other
|
||||||
Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
||||||
Plug('saadparwaiz1/cmp_luasnip') -- snippet engine
|
Plug('saadparwaiz1/cmp_luasnip') -- snippet engine
|
||||||
Plug('L3MON4D3/LuaSnip') -- snippet engine
|
Plug('L3MON4D3/LuaSnip') -- snippet engine
|
||||||
Plug('mickael-menu/zk-nvim') -- Zettelkasten
|
Plug('mickael-menu/zk-nvim') -- Zettelkasten
|
||||||
|
Plug('m-demare/hlargs.nvim') -- highlights arguments; great for func prog
|
||||||
|
|
||||||
---------
|
---------
|
||||||
vim.call('plug#end')
|
vim.call('plug#end')
|
||||||
|
|
||||||
-- color, highlighting, UI stuffs
|
-- color, highlighting, UI stuffs
|
||||||
vim.cmd([[ colorscheme gruvbox ]])
|
vim.cmd([[ colorscheme gruvbox ]])
|
||||||
|
require('hlargs').setup()
|
||||||
|
require('shade').setup{
|
||||||
|
overlay_opacity = 60,
|
||||||
|
opacity_step = 1,
|
||||||
|
keys = {
|
||||||
|
brightness_up = '<C-Up>',
|
||||||
|
brightness_down = '<C-Down>',
|
||||||
|
toggle = '<Leader>s', -- s: sha
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-- plugin keymaps
|
-- plugin keymaps
|
||||||
|
|
||||||
local function remap(mode, key_cmd, binded_fn, opts)
|
local function remap(mode, key_cmd, binded_fn, opts)
|
||||||
opts = opts or { remap = true }
|
opts = opts or { remap = true }
|
||||||
return vim.keymap.set(mode, key_cmd, binded_fn, opts)
|
return vim.keymap.set(mode, key_cmd, binded_fn, opts)
|
||||||
|
@ -219,7 +232,7 @@ end, { desc = '[Z]ettelkasten [G]rep' })
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'tsx', 'toml', 'lua', 'typescript', 'rust', 'go', 'yaml', 'json', 'php', 'css',
|
'tsx', 'toml', 'lua', 'typescript', 'rust', 'go', 'yaml', 'json', 'php', 'css',
|
||||||
'python', 'prisma', 'html', "dockerfile"
|
'python', 'prisma', 'html', "dockerfile", "c", "cpp",
|
||||||
},
|
},
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
|
@ -256,7 +269,7 @@ require('nvim-autopairs').setup {
|
||||||
}
|
}
|
||||||
|
|
||||||
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
|
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
|
||||||
parser_config.tsx.filetype_to_parsername = {"javascript", "typescript.tsx"}
|
parser_config.tsx.filetype_to_parsername = { "javascript", "typescript.tsx" }
|
||||||
|
|
||||||
|
|
||||||
require('guess-indent').setup {
|
require('guess-indent').setup {
|
||||||
|
@ -328,14 +341,14 @@ local on_attach = function(_, bufnr)
|
||||||
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
|
||||||
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
|
||||||
|
|
||||||
-- documentations. See `:help K` for why this keymap
|
-- documentations. See `:help K` for why this keymap
|
||||||
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
nmap('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||||
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
nmap('<C-k>', vim.lsp.buf.signature_help, 'Signature Documentation')
|
||||||
|
|
||||||
-- Lesser used LSP functionality
|
-- Lesser used LSP functionality
|
||||||
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||||
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
|
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
|
||||||
nmap('<leader>ja', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
nmap('<leader>ja', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder')
|
||||||
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder')
|
||||||
nmap('<leader>wl', function()
|
nmap('<leader>wl', function()
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
|
@ -385,11 +398,11 @@ require('mason-lspconfig').setup_handlers({
|
||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
library = vim.api.nvim_get_runtime_file('', true)
|
library = vim.api.nvim_get_runtime_file('', true)
|
||||||
},
|
},
|
||||||
telemetry = { enable = false }
|
telemetry = { enable = false }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
require('zk').setup({
|
require('zk').setup({
|
||||||
|
@ -399,7 +412,7 @@ require('zk').setup({
|
||||||
cmd = { "zk", "lsp" },
|
cmd = { "zk", "lsp" },
|
||||||
name = "zk",
|
name = "zk",
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
},
|
},
|
||||||
auto_attach = {
|
auto_attach = {
|
||||||
enable = true,
|
enable = true,
|
||||||
filetypes = { "markdown" }
|
filetypes = { "markdown" }
|
||||||
|
@ -447,11 +460,11 @@ cmp.setup {
|
||||||
mapping = cmp.mapping.preset.insert {
|
mapping = cmp.mapping.preset.insert {
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = true,
|
select = true,
|
||||||
},
|
},
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
['<Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
|
@ -459,7 +472,7 @@ select = true,
|
||||||
luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { 'i', 's' }),
|
end, { 'i', 's' }),
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
|
|
Loading…
Reference in New Issue