Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
RakerZh committed Sep 4, 2024
1 parent 90862fe commit 44fbae2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lua/keymap/remap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ nmap({
imap({
{ '<C-w>', '<C-[>diwa' },
{ '<C-h>', '<Bs>' },
{ '<C-j>', '<Esc>o' },
{ '<C-k>', '<Esc>O' },
{ '<C-l>', '<Right>' },
{ '<C-d>', '<Del>' },
{ '<C-u>', '<C-G>u<C-u>' },
{ '<C-b>', '<Left>' },
{ '<C-f>', '<Right>' },
-- { '<C-f>', '<Right>' },
{ '<C-a>', '<Esc>^i' },
{ '<C-j>', '<Esc>o' },
{ '<C-k>', '<Esc>O' },
{ '<C-s>', '<ESC>:w<CR>' },
{
'<C-e>',
Expand Down
3 changes: 2 additions & 1 deletion lua/modules/completion/frontend.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ lspconfig.jsonls.setup({
})

lspconfig.tsserver.setup({
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
on_attach = _attach,
capabilities = capabilities,
})

lspconfig.eslint.setup({
filetypes = { 'javascriptreact', 'typescriptreact' },
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
on_attach = function(client, bufnr)
_attach(client)
vim.api.nvim_create_autocmd('BufWritePre', {
Expand Down
5 changes: 5 additions & 0 deletions lua/modules/completion/package.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ local function lsp_fts(type)
'typescript',
'typescriptreact',
'json',
'vue',
}
if not type then
return vim.list_extend(fts.backend, fts.frontend)
Expand Down Expand Up @@ -139,6 +140,10 @@ packadd({
build = 'make install_jsregexp',
})

packadd({
'norcalli/nvim-colorizer.lua',
})

packadd({
'hrsh7th/nvim-cmp',
ft = lsp_fts(),
Expand Down

0 comments on commit 44fbae2

Please sign in to comment.