Lots of update
This commit is contained in:
+7
-2
@@ -11,7 +11,6 @@ nnoremap <silent> <leader>p :lua vim.diagnostic.goto_prev()<CR>
|
||||
nnoremap <silent> <leader>e :lua vim.diagnostic.open_float()<CR>
|
||||
|
||||
" vim-plug config
|
||||
|
||||
call plug#begin()
|
||||
" Plug 'williamboman/mason.nvim'
|
||||
" Plug 'williamboman/mason-lspconfig.nvim'
|
||||
@@ -47,7 +46,13 @@ Plug 'iamcco/markdown-preview.nvim'
|
||||
|
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||
|
||||
" Plug 'voldikss/vim-floaterm' " Floating terminal window (useless)
|
||||
Plug 'vimwiki/vimwiki'
|
||||
|
||||
let g:vimwiki_list = [{'path': '~/files/notes', 'syntax': 'markdown', 'ext': 'md'}]
|
||||
let g:vimwiki_global_ext = 0
|
||||
let g:vimwiki_ext2syntax = {}
|
||||
let g:vimwiki_folding = 'expr'
|
||||
set foldlevelstart=1
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ require'nvim-treesitter.configs'.setup {
|
||||
--})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "tex",
|
||||
pattern = { "tex", "scilab" },
|
||||
callback = function()
|
||||
vim.bo.tabstop = 4
|
||||
vim.bo.shiftwidth = 4
|
||||
@@ -4,7 +4,8 @@ local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["UltiSnips#Anon"](args.body)
|
||||
-- vim.fn["UltiSnips#ExpandSnippet"]()
|
||||
vim.fn["UltiSnips#Anon"](args.body) -- previous one mostly works
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
@@ -49,31 +50,33 @@ cmp.setup.cmdline(':', {
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
local lsp = require('lspconfig')
|
||||
|
||||
lsp.ccls.setup{
|
||||
capabilities = capabilities,
|
||||
init_options = {
|
||||
cache = {
|
||||
directory = vim.fn.expand("~/.cache/ccls") -- Store index globally
|
||||
},
|
||||
compilationDatabaseDirectory = "build", -- Uses 'build/compile_commands.json' if present
|
||||
highlight = { lsRanges = true }, -- Improves semantic highlighting
|
||||
index = {
|
||||
threads = 4, -- Adjust based on your CPU (more threads = faster indexing)
|
||||
initialBlacklist = { ".*_test.cpp", ".*_unittest.cpp" } -- Avoid indexing test files
|
||||
},
|
||||
completion = {
|
||||
detailedLabel = true -- Better completion info
|
||||
},
|
||||
diagnostics = {
|
||||
onChange = 300 -- Delay diagnostics updates for better performance
|
||||
}
|
||||
}
|
||||
}
|
||||
-- lsp.ccls.setup{
|
||||
-- capabilities = capabilities,
|
||||
-- init_options = {
|
||||
-- cache = {
|
||||
-- directory = vim.fn.expand("~/.cache/ccls") -- Store index globally
|
||||
-- },
|
||||
-- compilationDatabaseDirectory = "build", -- Uses 'build/compile_commands.json' if present
|
||||
-- highlight = { lsRanges = true }, -- Improves semantic highlighting
|
||||
-- index = {
|
||||
-- threads = 4, -- Adjust based on your CPU (more threads = faster indexing)
|
||||
-- initialBlacklist = { ".*_test.cpp", ".*_unittest.cpp" }
|
||||
-- -- initialBlacklist = { ".*_test.cpp", ".*_unittest.cpp", "/home/furtest/linux_bidouille/.*" } -- Avoid indexing test files
|
||||
-- },
|
||||
-- completion = {
|
||||
-- detailedLabel = true -- Better completion info
|
||||
-- },
|
||||
-- diagnostics = {
|
||||
-- onChange = 300 -- Delay diagnostics updates for better performance
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
|
||||
|
||||
-- clangd and ccls are both C and C++ language servers
|
||||
-- having them both active at the same time is useless
|
||||
-- lsp.clangd.setup {
|
||||
-- capabilities = capabilities,
|
||||
-- }
|
||||
lsp.clangd.setup {
|
||||
capabilities = capabilities,
|
||||
cmd = { "clangd", "--enable-config" },
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user