vim indenting and code range
This commit is contained in:
parent
3490407647
commit
4273b7612e
2 changed files with 56 additions and 49 deletions
|
|
@ -36,13 +36,14 @@ nvim_lsp.rust_analyzer.setup({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
nvim_lsp.gopls.setup({
|
nvim_lsp.gopls.setup({
|
||||||
on_attach = function (client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
client.server_capabilities.semanticTokensProvider = {
|
client.server_capabilities.semanticTokensProvider = {
|
||||||
full = true,
|
full = true,
|
||||||
legend = {
|
legend = {
|
||||||
--tokenTypes = { 'namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'operator', 'decorator', },
|
--tokenTypes = { 'namespace', 'type', 'class', 'enum', 'interface', 'struct', 'typeParameter', 'parameter', 'variable', 'property', 'enumMember', 'event', 'function', 'method', 'macro', 'keyword', 'modifier', 'comment', 'string', 'number', 'regexp', 'operator', 'decorator', },
|
||||||
tokenTypes = { 'namespace' },
|
tokenTypes = { 'namespace' },
|
||||||
tokenModifiers = { 'declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async', 'modification', 'documentation', 'defaultLibrary',
|
tokenModifiers = { 'declaration', 'definition', 'readonly', 'static', 'deprecated', 'abstract', 'async',
|
||||||
|
'modification', 'documentation', 'defaultLibrary',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -67,7 +68,7 @@ nvim_lsp.hls.setup {
|
||||||
}
|
}
|
||||||
|
|
||||||
nvim_lsp.svelte.setup {
|
nvim_lsp.svelte.setup {
|
||||||
cmd = { "/home/barak/.yarn/bin/svelteserver", "--stdio" }
|
cmd = { "/home/barak/.bun/bin/bunx", "svelteserver", "--stdio" }
|
||||||
}
|
}
|
||||||
|
|
||||||
local runtime_path = vim.split(package.path, ';')
|
local runtime_path = vim.split(package.path, ';')
|
||||||
|
|
@ -146,28 +147,28 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||||
virtual_text = false,
|
virtual_text = false,
|
||||||
signs = true,
|
signs = true,
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Compe setup
|
-- Compe setup
|
||||||
require 'compe'.setup {
|
require 'compe'.setup {
|
||||||
enabled = true;
|
enabled = true,
|
||||||
autocomplete = true;
|
autocomplete = true,
|
||||||
debug = false;
|
debug = false,
|
||||||
min_length = 1;
|
min_length = 1,
|
||||||
preselect = 'disable';
|
preselect = 'disable',
|
||||||
throttle_time = 80;
|
throttle_time = 80,
|
||||||
source_timeout = 200;
|
source_timeout = 200,
|
||||||
incomplete_delay = 400;
|
incomplete_delay = 400,
|
||||||
max_abbr_width = 100;
|
max_abbr_width = 100,
|
||||||
max_kind_width = 100;
|
max_kind_width = 100,
|
||||||
max_menu_width = 100;
|
max_menu_width = 100,
|
||||||
documentation = true;
|
documentation = true,
|
||||||
|
|
||||||
source = {
|
source = {
|
||||||
path = true;
|
path = true,
|
||||||
nvim_lsp = true;
|
nvim_lsp = true,
|
||||||
};
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
--signature_cfg = {
|
--signature_cfg = {
|
||||||
|
|
|
||||||
12
.vimrc
12
.vimrc
|
|
@ -113,7 +113,6 @@ Plug 'chrisbra/NrrwRgn'
|
||||||
"Plug 'tpope/vim-fireplace', {'for': 'clojure'}
|
"Plug 'tpope/vim-fireplace', {'for': 'clojure'}
|
||||||
""Plug 'terryma/vim-multiple-cursors'
|
""Plug 'terryma/vim-multiple-cursors'
|
||||||
"Plug 'ambv/black'
|
"Plug 'ambv/black'
|
||||||
Plug 'kana/vim-textobj-user'
|
|
||||||
|
|
||||||
|
|
||||||
" Plugins I wish I used more
|
" Plugins I wish I used more
|
||||||
|
|
@ -126,7 +125,6 @@ Plug 'tpope/vim-unimpaired'
|
||||||
Plug 'b4winckler/vim-angry'
|
Plug 'b4winckler/vim-angry'
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'junegunn/vim-easy-align'
|
Plug 'junegunn/vim-easy-align'
|
||||||
Plug 'bps/vim-textobj-python'
|
|
||||||
|
|
||||||
" Plugins I NEED
|
" Plugins I NEED
|
||||||
Plug 'scrooloose/nerdcommenter'
|
Plug 'scrooloose/nerdcommenter'
|
||||||
|
|
@ -230,6 +228,8 @@ Plug 'kristijanhusak/defx-icons'
|
||||||
|
|
||||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
Plug 'nvim-treesitter/playground'
|
Plug 'nvim-treesitter/playground'
|
||||||
|
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
|
||||||
|
|
||||||
|
|
||||||
"Plug 'ggandor/lightspeed.nvim'
|
"Plug 'ggandor/lightspeed.nvim'
|
||||||
"Plug 'justinmk/vim-sneak'
|
"Plug 'justinmk/vim-sneak'
|
||||||
|
|
@ -280,7 +280,7 @@ nnoremap <silent> gW <cmd>lua vim.lsp.buf.workspace_symbol()<CR>
|
||||||
"nnoremap <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR>
|
"nnoremap <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR>
|
||||||
nnoremap <silent> ga <cmd>lua vim.lsp.buf.code_action()<CR>
|
nnoremap <silent> ga <cmd>lua vim.lsp.buf.code_action()<CR>
|
||||||
"nnoremap <silent> ga <cmd>lua require('telescope.builtin').lsp_code_actions({initial_mode = "normal"})<cr>
|
"nnoremap <silent> ga <cmd>lua require('telescope.builtin').lsp_code_actions({initial_mode = "normal"})<cr>
|
||||||
vnoremap <silent> ga <cmd>lua vim.lsp.buf.range_code_action()<CR>
|
vnoremap <silent> ga <cmd>lua vim.lsp.buf.code_action()<CR>
|
||||||
"vnoremap <silent> ga :<C-U>lua require('telescope.builtin').lsp_range_code_actions({initial_mode = "normal"})<cr>
|
"vnoremap <silent> ga :<C-U>lua require('telescope.builtin').lsp_range_code_actions({initial_mode = "normal"})<cr>
|
||||||
"nnoremap <silent> ge <cmd>lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, focusable = false})<CR>
|
"nnoremap <silent> ge <cmd>lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, focusable = false})<CR>
|
||||||
"nnoremap <silent> ge <cmd>lua vim.diagnostic.open_float({focusable = false})<CR>
|
"nnoremap <silent> ge <cmd>lua vim.diagnostic.open_float({focusable = false})<CR>
|
||||||
|
|
@ -1083,3 +1083,9 @@ map <F10> command! -nargs=0 Syn call Syn()
|
||||||
" Final hi links for TreeSitter
|
" Final hi links for TreeSitter
|
||||||
|
|
||||||
hi link @type.rust TSCSecondaryTypeParam
|
hi link @type.rust TSCSecondaryTypeParam
|
||||||
|
|
||||||
|
let s:gptool_temp = expand($HOME . '/src/gptool/bindings.vim')
|
||||||
|
if filereadable(s:gptool_temp)
|
||||||
|
exec ':so ' . s:gptool_temp
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue