mirror of
https://github.com/Phantop/dotfiles
synced 2024-12-22 05:06:59 +00:00
nvim: cleanup for readability and add quickscope
This commit is contained in:
parent
538746ed2e
commit
68675686d9
|
@ -1,11 +1,11 @@
|
|||
vim.filetype.add({
|
||||
vim.filetype.add{
|
||||
extension = {
|
||||
qb = 'python',
|
||||
tac = 'tac',
|
||||
tin = 'cpp',
|
||||
itin = 'cpp',
|
||||
}
|
||||
})
|
||||
}
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = 'tac',
|
||||
callback = function(args)
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
vim.g.mapleader = ' '
|
||||
|
||||
vim.keymap.set('', '<F7>', 'mzgg=G`z')
|
||||
vim.keymap.set('', 'r', '"_d')
|
||||
vim.g.mapleader = ' '
|
||||
|
||||
vim.keymap.set('n', '{', '<cmd>AerialPrev<CR>', { buffer = bufnr })
|
||||
vim.keymap.set('n', '}', '<cmd>AerialNext<CR>', { buffer = bufnr })
|
||||
vim.keymap.set('n', '<leader>a', '<cmd>AerialToggle!<CR>')
|
||||
|
||||
vim.keymap.set('n', 'gd', function() vim.lsp.buf.definition() end)
|
||||
vim.keymap.set('n', 'gD', function() vim.lsp.buf.type_definition() end)
|
||||
vim.keymap.set('n', '<leader>d', function() vim.lsp.buf.definition() end)
|
||||
|
|
|
@ -14,7 +14,7 @@ local has_words_before = function()
|
|||
end
|
||||
|
||||
local cmp = require('cmp')
|
||||
cmp.setup({
|
||||
cmp.setup{
|
||||
mapping = {
|
||||
['<Tab>'] = cmp.mapping(
|
||||
function (fallback)
|
||||
|
@ -36,10 +36,11 @@ cmp.setup({
|
|||
{{name = 'buffer'}},
|
||||
{{name = 'path'}}
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
require('lspconfig').clangd.setup{capabilities=capabilities}
|
||||
require('mason-lspconfig').setup_handlers {
|
||||
require('mason-lspconfig').setup_handlers{
|
||||
function (server_name)
|
||||
require('lspconfig')[server_name].setup {capabilities=capabilities}
|
||||
end
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
local paq = require 'paq' {
|
||||
require 'paq' {
|
||||
'dense-analysis/ale',
|
||||
'dracula/vim',
|
||||
'ibhagwan/fzf-lua',
|
||||
'kaarmu/typst.vim',
|
||||
'lewis6991/gitsigns.nvim',
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
'neovim/nvim-lspconfig',
|
||||
'nmac427/guess-indent.nvim',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvimtools/none-ls.nvim',
|
||||
'stevearc/aerial.nvim',
|
||||
|
||||
'unblevable/quick-scope',
|
||||
'vim-airline/vim-airline',
|
||||
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
|
||||
|
||||
'gbprod/none-ls-shellcheck.nvim',
|
||||
{ 'dracula/vim', as = 'dracula' },
|
||||
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
|
||||
|
||||
'L3MON4D3/LuaSnip',
|
||||
'hrsh7th/cmp-buffer',
|
||||
|
@ -24,16 +20,21 @@ local paq = require 'paq' {
|
|||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/nvim-cmp',
|
||||
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvimtools/none-ls.nvim',
|
||||
'gbprod/none-ls-shellcheck.nvim',
|
||||
|
||||
'neovim/nvim-lspconfig',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
{ 'williamboman/mason.nvim', build = ':MasonUpdate' },
|
||||
}
|
||||
|
||||
require('aerial').setup()
|
||||
require('gitsigns').setup()
|
||||
require('guess-indent').setup()
|
||||
require('ibl').setup()
|
||||
require('mason').setup()
|
||||
require('mason-lspconfig').setup()
|
||||
require('nvim-treesitter.configs').setup({highlight = {enable = true}})
|
||||
require('guess-indent').setup()
|
||||
require('nvim-treesitter.configs').setup{highlight = {enable = true}}
|
||||
|
||||
require('lsp')
|
||||
|
|
|
@ -3,4 +3,5 @@ autocmd BufReadPost,FileReadPost *.bz3 call gzip#read('bzip3 -rd')
|
|||
colorscheme dracula
|
||||
command Q q!
|
||||
let b:ale_linters = {'c': [''], 'sh': [''], 'php': ['']}
|
||||
let g:qs_highlight_on_keys = ['f', 'F', 't', 'T']
|
||||
]]
|
||||
|
|
Loading…
Reference in a new issue