feat(nvim): switch to coc, start config of lsps
This commit is contained in:
parent
e9555789be
commit
73ed0ba6de
6 changed files with 81 additions and 123 deletions
config/nvim
31
config/nvim/base.vim
Normal file
31
config/nvim/base.vim
Normal file
|
@ -0,0 +1,31 @@
|
|||
" make tabs only 2 spaces
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set expandtab
|
||||
set smartindent
|
||||
|
||||
set number
|
||||
set relativenumber
|
||||
|
||||
set undofile
|
||||
set undodir=/home/matt/.cache/nvim/
|
||||
|
||||
" set dot icon in place of trailing whitespaces
|
||||
set list listchars=tab:\ \ ,nbsp:␣,trail:•,extends:⟩,precedes:⟨
|
||||
|
||||
" use vscode keybinds for snippets completion
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ coc#pum#visible() ? coc#_select_confirm() :
|
||||
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
|
||||
\ CheckBackspace() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
|
||||
function! CheckBackspace() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
let g:coc_snippet_next = '<tab>'
|
||||
|
||||
" support scss @
|
||||
autocmd FileType scss setl iskeyword+=@-@
|
9
config/nvim/config.lua
Normal file
9
config/nvim/config.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
vim.opt.fillchars = {eob = " "}
|
||||
vim.cmd[[colorscheme dracula]]
|
||||
|
||||
-- https://github.com/AstroNvim/AstroNvim/issues/648#issuecomment-1511728897
|
||||
|
||||
vim.g.loaded_netrw = 0
|
||||
vim.g.loaded_netrwPlugin = 0
|
||||
|
||||
-- https://github.com/nvim-neo-tree/neo-tree.nvim/issues/983#issuecomment-1637372234
|
42
config/nvim/lsp.lua
Normal file
42
config/nvim/lsp.lua
Normal file
|
@ -0,0 +1,42 @@
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
|
||||
require('gitsigns').setup()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = 'dracula',
|
||||
globalstatus = true
|
||||
}
|
||||
}
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = true,
|
||||
window = {
|
||||
width = 30,
|
||||
},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = true,
|
||||
hide_by_name = {},
|
||||
hide_by_pattern = {},
|
||||
always_show = {},
|
||||
never_show = {},
|
||||
never_show_by_pattern = {},
|
||||
},
|
||||
},
|
||||
follow_current_file = {
|
||||
enabled = true,
|
||||
leave_dirs_open = true,
|
||||
}
|
||||
})
|
||||
require('todo-comments').setup()
|
||||
require("scrollbar").setup()
|
Loading…
Add table
Add a link
Reference in a new issue