Add more language servers
This commit is contained in:
parent
f557c593f9
commit
99c77a446a
|
@ -1,13 +1,14 @@
|
|||
" vim-plug
|
||||
call plug#begin()
|
||||
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug 'nvim-telescope/telescope.nvim'
|
||||
Plug 'williamboman/nvim-lsp-installer'
|
||||
Plug 'nixprime/cpsm', {'do': './install.sh'}
|
||||
Plug 'kien/ctrlp.vim'
|
||||
Plug 'prabirshrestha/vim-lsp'
|
||||
Plug 'prabirshrestha/asyncomplete-lsp.vim'
|
||||
Plug 'ConradIrwin/vim-bracketed-paste'
|
||||
Plug 'christoomey/vim-tmux-navigator'
|
||||
Plug 'cohama/lexima.vim', {'do': 'sed -i \"s/has(.nvim.) && //\" autoload/lexima/insmode.vim'}
|
||||
Plug 'cohama/lexima.vim'
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
Plug 'kristijanhusak/vim-hybrid-material'
|
||||
Plug 'lervag/vimtex'
|
||||
|
@ -32,6 +33,12 @@ Plug 'hrsh7th/vim-vsnip'
|
|||
call plug#end()
|
||||
|
||||
:lua require('lsp_config')
|
||||
:lua require('telescope-config')
|
||||
|
||||
let python_highlight_all=1
|
||||
let g:solarized_termcolors=256
|
||||
let g:airline_powerline_fonts = 1
|
||||
let mapleader=","
|
||||
|
||||
set autoindent
|
||||
set background=dark
|
||||
|
@ -78,11 +85,8 @@ vnoremap u y
|
|||
nnoremap <C-U> <C-O>
|
||||
nnoremap <C-E> <C-U>
|
||||
nnoremap <leader><space> :noh<CR>
|
||||
|
||||
let python_highlight_all=1
|
||||
let g:solarized_termcolors=256
|
||||
let g:airline_powerline_fonts = 1
|
||||
let mapleader=","
|
||||
nnoremap <C-o> <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>/ <cmd>lua require('telescope.builtin').live_grep{ cwd = vim.fn.systemlist("git rev-parse --show-toplevel")[1] }<cr>
|
||||
|
||||
colorscheme hybrid_material
|
||||
syntax enable
|
||||
|
@ -95,13 +99,6 @@ let g:vimwiki_markdown_link_ext = 1
|
|||
autocmd FileType vimwiki setlocal shiftwidth=2 softtabstop=2 expandtab
|
||||
|
||||
|
||||
" CtrlP
|
||||
let g:ctrlp_match_func = {'match': 'cpsm#CtrlPMatch'}
|
||||
nnoremap <silent> <C-o> :CtrlPBuffer<CR>
|
||||
let g:cpsm_unicode=1
|
||||
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
|
||||
|
||||
|
||||
" Allow xterm-key usage inside tmux
|
||||
execute "set <xUp>=\e[1;*A"
|
||||
execute "set <xDown>=\e[1;*B"
|
||||
|
|
|
@ -82,17 +82,41 @@ local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protoco
|
|||
require("nvim-lsp-installer").setup({
|
||||
automatic_installation = true, -- automatically detect which servers to install (based on which servers are set up via lspconfig)
|
||||
})
|
||||
|
||||
require('lspconfig').pyright.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require('lspconfig').texlab.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require('lspconfig').clangd.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require('lspconfig').bashls.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require('lspconfig').cmake.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require('lspconfig').dockerls.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
require('lspconfig').vimls.setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
|
||||
|
||||
require('lspconfig').ltex.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = function(client, bufnr)
|
||||
require("ltex_extra").setup{
|
||||
load_langs = {"nl-BE", "en-US"},
|
||||
load_langs = {"nl-BE", "en-GB"},
|
||||
init_check = true,
|
||||
}
|
||||
end,
|
||||
|
|
|
@ -10,7 +10,7 @@ end
|
|||
-- PUBLIC FUNCTIONS
|
||||
|
||||
M.writeFile = function(type, lang, lines)
|
||||
local filename = table.concat({ "ltex", type, lang, "txt" }, ".")
|
||||
local filename = "/home/user/.config/nvim/spell/" .. table.concat({ "ltex", type, lang, "txt" }, ".")
|
||||
local file = io.open(filename, "a+")
|
||||
io.output(file)
|
||||
for _, line in ipairs(lines) do
|
||||
|
@ -20,7 +20,8 @@ M.writeFile = function(type, lang, lines)
|
|||
end
|
||||
|
||||
M.readFile = function(type, lang)
|
||||
local filename = table.concat({ "ltex", type, lang, "txt" }, ".")
|
||||
local filename = "/home/user/.config/nvim/spell/" .. table.concat({ "ltex", type, lang, "txt" }, ".")
|
||||
print(vim.inspect(filename))
|
||||
local lines = {}
|
||||
if M.file_exists(filename) then
|
||||
local file = io.open(filename, "r")
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
local M = {}
|
||||
|
||||
local telescope = require("telescope")
|
||||
|
||||
M.project_files = function()
|
||||
local opts = {show_untracked = false} -- define here if you want to define something
|
||||
local ok = pcall(require"telescope.builtin".git_files, opts)
|
||||
if not ok then require"telescope.builtin".find_files(opts) end
|
||||
end
|
||||
|
||||
M.project_live_files = function()
|
||||
local opts = {search_dirs = { "file_b", "file_a" }} -- define here if you want to define something
|
||||
local ok = pcall(require"telescope.builtin".git_files, opts)
|
||||
if not ok then require"telescope.builtin".find_files(opts) end
|
||||
end
|
||||
|
||||
telescope.load_extension('fzf')
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<C-p>", "<CMD>lua require'telescope-config'.project_files()<CR>", {noremap = true, silent = true})
|
||||
|
||||
return M
|
|
@ -0,0 +1 @@
|
|||
Avé
|
Loading…
Reference in New Issue