nvim: copilot, ltex_extra
This commit is contained in:
parent
bd61358c17
commit
db695bc0f2
@ -82,7 +82,18 @@ require('packer').startup(function(use)
|
|||||||
|
|
||||||
use 'maxbrunsfeld/vim-yankstack'
|
use 'maxbrunsfeld/vim-yankstack'
|
||||||
use 'ntpeters/vim-better-whitespace'
|
use 'ntpeters/vim-better-whitespace'
|
||||||
use 'github/copilot.vim'
|
|
||||||
|
use {
|
||||||
|
"zbirenbaum/copilot.lua",
|
||||||
|
cmd = "Copilot",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function ()
|
||||||
|
vim.schedule(function()
|
||||||
|
require("copilot").setup()
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
use 'majutsushi/tagbar'
|
use 'majutsushi/tagbar'
|
||||||
|
|
||||||
-- Parens
|
-- Parens
|
||||||
@ -106,6 +117,9 @@ require('packer').startup(function(use)
|
|||||||
-- Latex preview
|
-- Latex preview
|
||||||
use {'xuhdev/vim-latex-live-preview', ft = 'tex', bufread = true}
|
use {'xuhdev/vim-latex-live-preview', ft = 'tex', bufread = true}
|
||||||
|
|
||||||
|
-- LTeX local code actions
|
||||||
|
use { "barreiroleo/ltex-extra.nvim" }
|
||||||
|
|
||||||
-- DevOps Quatsch
|
-- DevOps Quatsch
|
||||||
use {'cespare/vim-toml', ft = 'toml'}
|
use {'cespare/vim-toml', ft = 'toml'}
|
||||||
use {'mrk21/yaml-vim', ft = 'yaml'}
|
use {'mrk21/yaml-vim', ft = 'yaml'}
|
||||||
@ -394,12 +408,9 @@ vim.g.yankstack_map_keys = 0
|
|||||||
vim.keymap.set('n', '<S-P>', '<Plug>yankstack_substitute_newer_paste')
|
vim.keymap.set('n', '<S-P>', '<Plug>yankstack_substitute_newer_paste')
|
||||||
vim.keymap.set('n', '<C-P>', '<Plug>yankstack_substitute_older_paste')
|
vim.keymap.set('n', '<C-P>', '<Plug>yankstack_substitute_older_paste')
|
||||||
|
|
||||||
-- copilot
|
|
||||||
|
|
||||||
vim.cmd[[
|
vim.cmd [[
|
||||||
imap <silent><script><expr> <a-cr> copilot#Accept("\<CR>")
|
let g:livepreview_cursorhold_recompile = 0
|
||||||
let g:copilot_no_tab_map = v:true
|
|
||||||
highlight CopilotSuggestion guifg=#FFAF5F ctermfg=8
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- Window movement
|
-- Window movement
|
||||||
@ -428,11 +439,21 @@ nmap('<Leader>qb', require("nvim-smartbufs").close_current_buffer, 'Close curren
|
|||||||
|
|
||||||
-- LSP settings.
|
-- LSP settings.
|
||||||
-- This function gets run when an LSP connects to a particular buffer.
|
-- This function gets run when an LSP connects to a particular buffer.
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
-- NOTE: Remember that lua is a real programming language, and as such it is possible
|
-- NOTE: Remember that lua is a real programming language, and as such it is possible
|
||||||
-- to define small helper and utility functions so you don't have to repeat yourself
|
-- to define small helper and utility functions so you don't have to repeat yourself
|
||||||
|
|
||||||
|
if client.name == "ltex" then
|
||||||
|
print("loaded ltex extra")
|
||||||
|
require("ltex_extra").setup{
|
||||||
|
load_langs = { "de-DE", "en-US" }, -- table <string> : languages for witch dictionaries will be loaded
|
||||||
|
init_check = true, -- boolean : whether to load dictionaries on startup
|
||||||
|
path = "/home/rad4day/.config/nvim/ltex", -- string : path to store dictionaries. Relative path uses current working directory
|
||||||
|
log_level = "none", -- string : "none", "trace", "debug", "info", "warn", "error", "fatal"
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
-- many times.
|
-- many times.
|
||||||
--
|
|
||||||
-- In this case, we create a function that lets us more easily define mappings specific
|
-- In this case, we create a function that lets us more easily define mappings specific
|
||||||
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
||||||
local nmap = function(keys, func, desc)
|
local nmap = function(keys, func, desc)
|
||||||
@ -482,6 +503,20 @@ local servers = {
|
|||||||
pyright = {},
|
pyright = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
texlab = {}, -- latex
|
texlab = {}, -- latex
|
||||||
|
ltex = {
|
||||||
|
language = 'en-US',
|
||||||
|
languageToolHttpServerUri = 'http://localhost:8081',
|
||||||
|
additionalRules = {
|
||||||
|
enablePickyRules = true,
|
||||||
|
motherTongue = 'de-DE',
|
||||||
|
},
|
||||||
|
-- dictionary = {
|
||||||
|
-- customEntries = {
|
||||||
|
-- 'foo',
|
||||||
|
-- 'bar',
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
}, -- languagetool
|
||||||
-- tsserver = {},
|
-- tsserver = {},
|
||||||
|
|
||||||
sumneko_lua = {
|
sumneko_lua = {
|
||||||
|
Loading…
Reference in New Issue
Block a user