mirror of
https://github.com/ksyasuda/rice.git
synced 2024-10-28 09:04:10 -07:00
update
This commit is contained in:
parent
4aac865473
commit
3d0bb88e88
@ -62,7 +62,6 @@ Plug 'tpope/vim-commentary'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'wakatime/vim-wakatime'
|
||||
Plug 'voldikss/vim-floaterm'
|
||||
Plug 'pechorin/any-jump.vim'
|
||||
@ -70,8 +69,8 @@ Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'ap/vim-css-color'
|
||||
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'maximbaz/lightline-ale'
|
||||
Plug 'osyo-manga/vim-over'
|
||||
Plug 'github/copilot.vim'
|
||||
|
||||
" Plug 'dense-analysis/ale'
|
||||
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
@ -80,12 +79,13 @@ if has('nvim')
|
||||
Plug 'akinsho/bufferline.nvim'
|
||||
" Plug 'chentau/marks.nvim'
|
||||
Plug 'folke/which-key.nvim'
|
||||
Plug 'github/copilot.vim'
|
||||
Plug 'glepnir/dashboard-nvim'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'kyazdani42/nvim-tree.lua'
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
Plug 'TimUntersberger/neogit'
|
||||
Plug 'ojroques/nvim-lspfuzzy'
|
||||
Plug 'nvim-lualine/lualine.nvim'
|
||||
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'williamboman/nvim-lsp-installer'
|
||||
@ -99,7 +99,10 @@ if has('nvim')
|
||||
Plug 'onsails/lspkind-nvim'
|
||||
Plug 'saadparwaiz1/cmp_luasnip'
|
||||
Plug 'L3MON4D3/LuaSnip'
|
||||
Plug 'rmagatti/goto-preview',
|
||||
Plug 'folke/trouble.nvim'
|
||||
|
||||
Plug 'olimorris/onedarkpro.nvim'
|
||||
Plug 'NTBBloodbath/doom-one.nvim'
|
||||
Plug 'Mofiqul/dracula.nvim'
|
||||
Plug 'projekt0n/github-nvim-theme'
|
||||
@ -109,6 +112,8 @@ else
|
||||
Plug 'mhinz/vim-startify'
|
||||
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] }
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'maximbaz/lightline-ale'
|
||||
|
||||
Plug 'joshdick/onedark.vim'
|
||||
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
||||
@ -127,14 +132,19 @@ if has('nvim')
|
||||
source ~/.config/nvim/plugin-confs/nvimtree.lua
|
||||
source ~/.config/nvim/plugin-confs/treesitter.lua
|
||||
source ~/.config/nvim/plugin-confs/neogit.lua
|
||||
source ~/.config/nvim/plugin-confs/lspfuzzy.lua
|
||||
source ~/.config/nvim/plugin-confs/lualine.lua
|
||||
|
||||
set completeopt=menu,menuone,noselect
|
||||
source ~/.config/nvim/plugin-confs/code_actions.lua
|
||||
source ~/.config/nvim/plugin-confs/lspconfig.lua
|
||||
source ~/.config/nvim/plugin-confs/lsp-signature.lua
|
||||
source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
||||
source ~/.config/nvim/plugin-confs/null-ls.lua
|
||||
source ~/.config/nvim/plugin-confs/nvim-cmp.lua
|
||||
source ~/.config/nvim/plugin-confs/lsp-kind.lua
|
||||
source ~/.config/nvim/plugin-confs/goto-preview.lua
|
||||
source ~/.config/nvim/plugin-confs/trouble.lua
|
||||
|
||||
source ~/.vim/plugin-confs/fzf.vim
|
||||
source ~/.vim/plugin-confs/vim-closetag.vim
|
||||
@ -145,6 +155,7 @@ if has('nvim')
|
||||
source ~/.config/nvim/plugin-confs/doomone.lua
|
||||
source ~/.config/nvim/plugin-confs/dracula.lua
|
||||
source ~/.config/nvim/plugin-confs/github-theme.lua
|
||||
source ~/.config/nvim/plugin-confs/onedarkpro.lua
|
||||
|
||||
" makes fzf match colorscheme (I think)
|
||||
augroup fzf_preview
|
||||
@ -239,4 +250,8 @@ command! Aniwrapper execute ":FloatermNew aniwrapper -qtdoomone -D 144"
|
||||
"------------------------------------------------------------------------------
|
||||
let g:mapleader = "\<Space>"
|
||||
let g:maplocalleader = ','
|
||||
source ~/.vim/keybindings.vim
|
||||
if has('nvim')
|
||||
source ~/.config/nvim/keybindings.vim
|
||||
else
|
||||
source ~/.vim/keybindings.vim
|
||||
endif
|
||||
|
97
nvim/keybindings.vim
Normal file
97
nvim/keybindings.vim
Normal file
@ -0,0 +1,97 @@
|
||||
" KEYBINDINGS
|
||||
" imap <TAB> <C-N>
|
||||
nmap <F4> :set paste!<Bar>set paste?<CR>
|
||||
nmap <F5> :!
|
||||
" nmap <C-n> :NERDTreeToggle<CR>
|
||||
nmap <C-n> :NvimTreeToggle<CR>
|
||||
" nnoremap <C-T> :wa<CR>:vertical botright term ++kill=term<CR>
|
||||
nmap Q !!$SHELL<CR>
|
||||
|
||||
" reselect visual selection after indent
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
||||
" open file under cursor, create if necessary
|
||||
nnoremap gF :edit <cfile><cr>
|
||||
|
||||
" fzf
|
||||
nnoremap // :Lines<CR>
|
||||
nnoremap ?? :BLines<CR>
|
||||
|
||||
" aniwrapper/ani-cli (until i find better use for a keys)
|
||||
nmap <leader>as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144<CR>
|
||||
nmap <leader>ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144<CR>
|
||||
" buffers
|
||||
" nmap <leader>bB :CocCommand fzf-preview.AllBuffers<CR>
|
||||
nmap <leader>bb :Buffers<CR>
|
||||
nmap <leader>bk :bdelete<CR>
|
||||
nmap <leader>bn :bnext<CR>
|
||||
nmap <leader>bp :bprev<CR>
|
||||
nmap <C-J> :bnext<CR>
|
||||
nmap <C-K> :bprev<CR>
|
||||
nmap <leader>cd :LspDiagnostics <bufnr><CR>
|
||||
" git
|
||||
nmap <leader>gc :CocCommand fzf-preview.GitLogs<CR>
|
||||
nmap <leader>gf :GitFiles<CR>
|
||||
if has('nvim')
|
||||
nmap <leader>gg :Neogit<CR>
|
||||
else
|
||||
nmap <leader>gg :FloatermNew --title=lazygit --opener=vsplit --width=1.0 --height=1.0 lazygit<CR>
|
||||
endif
|
||||
" nmap <leader>gs :CocCommand fzf-preview.GitStatus<CR>
|
||||
" nmap gr :<C-u>CocCommand fzf-preview.CocReferences<CR>
|
||||
nnoremap gpc <cmd>lua require('goto-preview').close_all_win()<CR>
|
||||
nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>
|
||||
nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
|
||||
nnoremap gP <cmd>lua require('goto-preview').close_all_win()<CR>
|
||||
nnoremap gR <cmd>TroubleToggle lsp_references<cr>
|
||||
" Only set if you have telescope installed
|
||||
" nnoremap gpr <cmd>lua require('goto-preview').goto_preview_references()<CR>
|
||||
" help/history
|
||||
nmap <leader>hc :Commands<CR>
|
||||
nmap <leader>hk :Maps<CR>
|
||||
" insert snippets
|
||||
nmap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
|
||||
" any jump plugin
|
||||
nmap <leader>j :AnyJump<CR>
|
||||
nmap <leader>n :NvimTreeToggle<CR>
|
||||
" toggle/open
|
||||
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
||||
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
||||
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
||||
nmap <leader>oo :OverCommandLine<CR>
|
||||
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
||||
" nmap <leader>ot :vertical botright ter ++kill=terminal ++close<CR>
|
||||
nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5<CR>
|
||||
" refresh nvimtree for now
|
||||
nmap <leader>r :NvimTreeRefresh<CR>
|
||||
" search
|
||||
nmap <leader>sc :nohls<Cr>
|
||||
nmap <leader>sf :Files<Cr>
|
||||
nmap <leader>sF :AllFiles<Cr>
|
||||
" toggle coc outline
|
||||
nmap <leader>to :SymbolsOutline<CR>
|
||||
" terminal
|
||||
nmap <leader>tt :FloatermToggle vsplit-term<CR>
|
||||
nmap <C-T> :wa<CR>:FloatermToggle floatingterm<CR>
|
||||
" for toggling/hiding the vsplit-term
|
||||
tnoremap <leader>tt <C-\><C-N>:FloatermToggle vsplit-term<CR>
|
||||
tnoremap <C-T> <C-\><C-n>:FloatermToggle floatingterm<CR>
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
|
||||
nnoremap <leader>xx <cmd>TroubleToggle<cr>
|
||||
nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr>
|
||||
nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr>
|
||||
nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
|
||||
nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
|
||||
|
||||
nmap <Leader>ss :<C-u>SessionSave<CR>
|
||||
nmap <Leader>sl :<C-u>SessionLoad<CR>
|
||||
nnoremap <silent> <Leader>fh :DashboardFindHistory<CR>
|
||||
" search fzf, refs, impls, defs
|
||||
nmap <leader>ff :CocCommand fzf-preview.ProjectFiles<CR>
|
||||
" nnoremap <silent> <Leader>ff :DashboardFindFile<CR>
|
||||
nnoremap <silent> <Leader>tc :DashboardChangeColorscheme<CR>
|
||||
nnoremap <silent> <Leader>fa :DashboardFindWord<CR>
|
||||
nnoremap <silent> <Leader>fb :DashboardJumpMark<CR>
|
||||
nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
|
61
nvim/plugin-confs/catppuccin.lua
Normal file
61
nvim/plugin-confs/catppuccin.lua
Normal file
@ -0,0 +1,61 @@
|
||||
local catppuccin = require("catppuccin")
|
||||
|
||||
local settings = {
|
||||
transparent_background = false,
|
||||
term_colors = false,
|
||||
styles = {
|
||||
comments = "italic",
|
||||
functions = "italic",
|
||||
keywords = "italic",
|
||||
strings = "NONE",
|
||||
variables = "italic",
|
||||
},
|
||||
integrations = {
|
||||
treesitter = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = "italic",
|
||||
hints = "italic",
|
||||
warnings = "italic",
|
||||
information = "italic",
|
||||
},
|
||||
underlines = {
|
||||
errors = "underline",
|
||||
hints = "underline",
|
||||
warnings = "underline",
|
||||
information = "underline",
|
||||
},
|
||||
},
|
||||
lsp_trouble = false,
|
||||
cmp = true,
|
||||
lsp_saga = false,
|
||||
gitgutter = false,
|
||||
gitsigns = true,
|
||||
telescope = true,
|
||||
nvimtree = {
|
||||
enabled = true,
|
||||
show_root = false,
|
||||
transparent_panel = false,
|
||||
},
|
||||
which_key = false,
|
||||
indent_blankline = {
|
||||
enabled = true,
|
||||
colored_indent_levels = false,
|
||||
},
|
||||
dashboard = true,
|
||||
neogit = false,
|
||||
vim_sneak = false,
|
||||
fern = false,
|
||||
barbar = false,
|
||||
bufferline = true,
|
||||
markdown = true,
|
||||
lightspeed = false,
|
||||
ts_rainbow = false,
|
||||
hop = false,
|
||||
notify = true,
|
||||
telekasten = true,
|
||||
}
|
||||
}
|
||||
|
||||
catppuccin.setup(settings)
|
14
nvim/plugin-confs/code_actions.lua
Normal file
14
nvim/plugin-confs/code_actions.lua
Normal file
@ -0,0 +1,14 @@
|
||||
local M = {}
|
||||
|
||||
local lsp_util = vim.lsp.util
|
||||
|
||||
function M.code_action_listener()
|
||||
local context = { diagnostics = vim.lsp.diagnostic.get_line_diagnostics() }
|
||||
local params = lsp_util.make_range_params()
|
||||
params.context = context
|
||||
vim.lsp.buf_request(0, 'textDocument/codeAction', params, function(err, _, result)
|
||||
-- do something with result - e.g. check if empty and show some indication such as a sign
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
18
nvim/plugin-confs/goto-preview.lua
Normal file
18
nvim/plugin-confs/goto-preview.lua
Normal file
@ -0,0 +1,18 @@
|
||||
require('goto-preview').setup {
|
||||
width = 120; -- Width of the floating window
|
||||
height = 15; -- Height of the floating window
|
||||
border = {"↖", "─" ,"┐", "│", "┘", "─", "└", "│"}; -- Border characters of the floating window
|
||||
default_mappings = false; -- Bind default mappings
|
||||
debug = false; -- Print debug information
|
||||
opacity = nil; -- 0-100 opacity level of the floating window where 100 is fully transparent.
|
||||
resizing_mappings = false; -- Binds arrow keys to resizing the floating window.
|
||||
post_open_hook = nil; -- A function taking two arguments, a buffer and a window to be ran as a hook.
|
||||
references = { -- Configure the telescope UI for slowing the references cycling window.
|
||||
-- telescope = telescope.themes.get_dropdown({ hide_preview = false })
|
||||
};
|
||||
-- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality.
|
||||
focus_on_open = true; -- Focus the floating window when opening it.
|
||||
dismiss_on_move = false; -- Dismiss the floating window when moving the cursor.
|
||||
force_close = true, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close
|
||||
bufhidden = "wipe", -- the bufhidden option to set on the floating window. See :h bufhidden
|
||||
}
|
16
nvim/plugin-confs/lspfuzzy.lua
Normal file
16
nvim/plugin-confs/lspfuzzy.lua
Normal file
@ -0,0 +1,16 @@
|
||||
require('lspfuzzy').setup {
|
||||
methods = 'all', -- either 'all' or a list of LSP methods (see below)
|
||||
jump_one = true, -- jump immediately if there is only one location
|
||||
save_last = false, -- save last location results for the :LspFuzzyLast command
|
||||
callback = nil, -- callback called after jumping to a location
|
||||
fzf_preview = { -- arguments to the FZF '--preview-window' option
|
||||
'right:+{2}-/2' -- preview on the right and centered on entry
|
||||
},
|
||||
fzf_action = { -- FZF actions
|
||||
['ctrl-t'] = 'tab split', -- go to location in a new tab
|
||||
['ctrl-v'] = 'vsplit', -- go to location in a vertical split
|
||||
['ctrl-x'] = 'split', -- go to location in a horizontal split
|
||||
},
|
||||
fzf_modifier = ':~:.', -- format FZF entries, see |filename-modifiers|
|
||||
fzf_trim = false, -- trim FZF entries
|
||||
}
|
52
nvim/plugin-confs/lualine.lua
Normal file
52
nvim/plugin-confs/lualine.lua
Normal file
@ -0,0 +1,52 @@
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'codedark',
|
||||
-- theme = 'dracula',
|
||||
-- theme = 'horizon',
|
||||
-- theme = 'onedark',
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = {'branch', 'diff'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {
|
||||
{
|
||||
'diagnostics',
|
||||
'fileformat',
|
||||
symbols = {
|
||||
unix = '', -- e712
|
||||
dos = '', -- e70f
|
||||
mac = '', -- e711
|
||||
}
|
||||
}, 'encoding', 'fileformat', {'filetype', colored=true, icon_only=false}},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {
|
||||
{
|
||||
'filename',
|
||||
file_status = true, -- Displays file status (readonly status, modified status)
|
||||
path = 0, -- 0: Just the filename
|
||||
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
||||
symbols = {
|
||||
modified = '[+]', -- Text to show when the file is modified.
|
||||
readonly = '[-]', -- Text to show when the file is non-modifiable or readonly.
|
||||
unnamed = '[No Name]', -- Text to show for unnamed buffers.
|
||||
}
|
||||
},
|
||||
},
|
||||
lualine_x = {'location'},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {'quickfix', 'fzf', 'nvim-tree', 'symbols-outline', 'fugitive'}
|
||||
}
|
@ -2,17 +2,6 @@ local null_ls = require("null-ls")
|
||||
local helpers = require("null-ls.helpers")
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
require("null-ls").builtins.diagnostics.eslint,
|
||||
require("null-ls").builtins.completion.spell,
|
||||
require("null-ls").builtins.formatting.shfmt.with({
|
||||
extra_args = { "-i", "4", "-ci", "-sr" }
|
||||
}),
|
||||
require("null-ls").builtins.diagnostics.shellcheck.with({
|
||||
extra_args = { "-s", "bash", "-o", "check-extra-masked-returns, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which, quote-safe-variables" }
|
||||
})
|
||||
},
|
||||
on_attach = function(client)
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
vim.cmd([[
|
||||
@ -23,45 +12,56 @@ require("null-ls").setup({
|
||||
]])
|
||||
end
|
||||
end,
|
||||
sources = {
|
||||
require("null-ls").builtins.completion.spell,
|
||||
require("null-ls").builtins.formatting.shfmt.with({
|
||||
filetypes = {"sh", "bash"},
|
||||
extra_args = { "-i", "4", "-ci", "-sr" }
|
||||
}),
|
||||
require("null-ls").builtins.code_actions.shellcheck,
|
||||
require("null-ls").builtins.diagnostics.shellcheck.with({
|
||||
extra_args = { "--format", "json1", "--source-path=$DIRNAME", "--external-sources", "-", "-s", "bash", "-o", "check-extra-masked-returns, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which, quote-safe-variables" }
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
||||
local markdownlint = {
|
||||
method = null_ls.methods.DIAGNOSTICS,
|
||||
filetypes = { "markdown" },
|
||||
-- null_ls.generator creates an async source
|
||||
-- that spawns the command with the given arguments and options
|
||||
generator = null_ls.generator({
|
||||
command = "markdownlint",
|
||||
args = { "--stdin" },
|
||||
to_stdin = true,
|
||||
from_stderr = true,
|
||||
-- choose an output format (raw, json, or line)
|
||||
format = "line",
|
||||
check_exit_code = function(code, stderr)
|
||||
local success = code <= 1
|
||||
-- local markdownlint = {
|
||||
-- method = null_ls.methods.DIAGNOSTICS,
|
||||
-- filetypes = { "markdown" },
|
||||
-- -- null_ls.generator creates an async source
|
||||
-- -- that spawns the command with the given arguments and options
|
||||
-- generator = null_ls.generator({
|
||||
-- command = "markdownlint",
|
||||
-- args = { "--stdin" },
|
||||
-- to_stdin = true,
|
||||
-- from_stderr = true,
|
||||
-- -- choose an output format (raw, json, or line)
|
||||
-- format = "line",
|
||||
-- check_exit_code = function(code, stderr)
|
||||
-- local success = code <= 1
|
||||
|
||||
if not success then
|
||||
-- can be noisy for things that run often (e.g. diagnostics), but can
|
||||
-- be useful for things that run on demand (e.g. formatting)
|
||||
print(stderr)
|
||||
end
|
||||
-- if not success then
|
||||
-- -- can be noisy for things that run often (e.g. diagnostics), but can
|
||||
-- -- be useful for things that run on demand (e.g. formatting)
|
||||
-- print(stderr)
|
||||
-- end
|
||||
|
||||
return success
|
||||
end,
|
||||
-- use helpers to parse the output from string matchers,
|
||||
-- or parse it manually with a function
|
||||
on_output = helpers.diagnostics.from_patterns({
|
||||
{
|
||||
pattern = [[:(%d+):(%d+) [%w-/]+ (.*)]],
|
||||
groups = { "row", "col", "message" },
|
||||
},
|
||||
{
|
||||
pattern = [[:(%d+) [%w-/]+ (.*)]],
|
||||
groups = { "row", "message" },
|
||||
},
|
||||
}),
|
||||
}),
|
||||
}
|
||||
-- return success
|
||||
-- end,
|
||||
-- -- use helpers to parse the output from string matchers,
|
||||
-- -- or parse it manually with a function
|
||||
-- on_output = helpers.diagnostics.from_patterns({
|
||||
-- {
|
||||
-- pattern = [[:(%d+):(%d+) [%w-/]+ (.*)]],
|
||||
-- groups = { "row", "col", "message" },
|
||||
-- },
|
||||
-- {
|
||||
-- pattern = [[:(%d+) [%w-/]+ (.*)]],
|
||||
-- groups = { "row", "message" },
|
||||
-- },
|
||||
-- }),
|
||||
-- }),
|
||||
-- }
|
||||
|
||||
-- local shellcheck = {
|
||||
-- method = null_ls.methods.DIAGNOSTICS,
|
||||
@ -95,5 +95,5 @@ local markdownlint = {
|
||||
-- }),
|
||||
-- }
|
||||
|
||||
null_ls.register(markdownlint)
|
||||
-- null_ls.register(markdownlint)
|
||||
-- null_ls.register(shellcheck)
|
||||
|
@ -40,24 +40,24 @@ cmp.setup({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
},
|
||||
['<Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
['<S-Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
-- ['<Tab>'] = function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_next_item()
|
||||
-- elseif luasnip.expand_or_jumpable() then
|
||||
-- luasnip.expand_or_jump()
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end,
|
||||
-- ['<S-Tab>'] = function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_prev_item()
|
||||
-- elseif luasnip.jumpable(-1) then
|
||||
-- luasnip.jump(-1)
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end,
|
||||
},
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
|
38
nvim/plugin-confs/onedarkpro.lua
Normal file
38
nvim/plugin-confs/onedarkpro.lua
Normal file
@ -0,0 +1,38 @@
|
||||
local onedarkpro = require("onedarkpro")
|
||||
onedarkpro.setup({
|
||||
-- Theme can be overwritten with 'onedark' or 'onelight' as a string!
|
||||
-- theme = function()
|
||||
-- if vim.o.background == "dark" then
|
||||
-- return "onedark"
|
||||
-- else
|
||||
-- return "onelight"
|
||||
-- end
|
||||
-- end,
|
||||
theme = "onedark",
|
||||
colors = {}, -- Override default colors. Can specify colors for "onelight" or "onedark" themes by passing in a table
|
||||
hlgroups = {}, -- Override default highlight groups
|
||||
plugins = { -- Override which plugins highlight groups are loaded
|
||||
native_lsp = true,
|
||||
polygot = true,
|
||||
treesitter = true,
|
||||
-- Others omitted for brevity
|
||||
},
|
||||
styles = {
|
||||
comments = "italic",
|
||||
functions = "bold",
|
||||
keywords = "bold,italic",
|
||||
strings = "italic",
|
||||
variables = "bold"
|
||||
},
|
||||
options = {
|
||||
bold = true, -- Use the themes opinionated bold styles?
|
||||
italic = true, -- Use the themes opinionated italic styles?
|
||||
underline = false, -- Use the themes opinionated underline styles?
|
||||
undercurl = false, -- Use the themes opinionated undercurl styles?
|
||||
cursorline = false, -- Use cursorline highlighting?
|
||||
transparency = false, -- Use a transparent background?
|
||||
terminal_colors = true, -- Use the theme's colors for Neovim's :terminal?
|
||||
window_unfocussed_color = false, -- When the window is out of focus, change the normal background?
|
||||
}
|
||||
})
|
||||
onedarkpro.load()
|
5
nvim/plugin-confs/tokyodark.lua
Normal file
5
nvim/plugin-confs/tokyodark.lua
Normal file
@ -0,0 +1,5 @@
|
||||
vim.g.tokyodark_transparent_background = false
|
||||
vim.g.tokyodark_enable_italic_comment = true
|
||||
vim.g.tokyodark_enable_italic = true
|
||||
vim.g.tokyodark_color_gamma = "1.0"
|
||||
vim.cmd("colorscheme tokyodark")
|
47
nvim/plugin-confs/trouble.lua
Normal file
47
nvim/plugin-confs/trouble.lua
Normal file
@ -0,0 +1,47 @@
|
||||
require("trouble").setup {
|
||||
position = "bottom", -- position of the list can be: bottom, top, left, right
|
||||
height = 10, -- height of the trouble list when position is top or bottom
|
||||
width = 50, -- width of the list when position is left or right
|
||||
icons = true, -- use devicons for filenames
|
||||
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||
fold_open = "", -- icon used for open folds
|
||||
fold_closed = "", -- icon used for closed folds
|
||||
group = true, -- group results by file
|
||||
padding = true, -- add an extra new line on top of the list
|
||||
action_keys = { -- key mappings for actions in the trouble list
|
||||
-- map to {} to remove a mapping, for example:
|
||||
-- close = {},
|
||||
close = "q", -- close the list
|
||||
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
|
||||
refresh = "r", -- manually refresh
|
||||
jump = {"<cr>", "<tab>"}, -- jump to the diagnostic or open / close folds
|
||||
open_split = { "<c-x>" }, -- open buffer in new split
|
||||
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
|
||||
open_tab = { "<c-t>" }, -- open buffer in new tab
|
||||
jump_close = {"o"}, -- jump to the diagnostic and close the list
|
||||
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
|
||||
toggle_preview = "P", -- toggle auto_preview
|
||||
hover = "K", -- opens a small popup with the full multiline message
|
||||
preview = "p", -- preview the diagnostic location
|
||||
close_folds = {"zM", "zm"}, -- close all folds
|
||||
open_folds = {"zR", "zr"}, -- open all folds
|
||||
toggle_fold = {"zA", "za"}, -- toggle fold of current file
|
||||
previous = "k", -- preview item
|
||||
next = "j" -- next item
|
||||
},
|
||||
indent_lines = true, -- add an indent guide below the fold icons
|
||||
auto_open = false, -- automatically open the list when you have diagnostics
|
||||
auto_close = false, -- automatically close the list when you have no diagnostics
|
||||
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
|
||||
auto_fold = false, -- automatically fold a file trouble list at creation
|
||||
auto_jump = {"lsp_definitions"}, -- for the given modes, automatically jump if there is only a single result
|
||||
signs = {
|
||||
-- icons / text used for a diagnostic
|
||||
error = "",
|
||||
warning = "",
|
||||
hint = "",
|
||||
information = "",
|
||||
other = ""
|
||||
},
|
||||
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
|
||||
}
|
Loading…
Reference in New Issue
Block a user