Oh my little refactor
This commit is contained in:
parent
ff494a0caa
commit
82987a454c
2 changed files with 46 additions and 39 deletions
|
|
@ -35,3 +35,29 @@ opt.langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKL
|
||||||
opt.colorcolumn = "120"
|
opt.colorcolumn = "120"
|
||||||
|
|
||||||
opt.mouse = ""
|
opt.mouse = ""
|
||||||
|
|
||||||
|
vim.filetype.add({
|
||||||
|
extension = {
|
||||||
|
vp = 'glsl',
|
||||||
|
fp = 'glsl',
|
||||||
|
gp = 'glsl',
|
||||||
|
vs = 'glsl',
|
||||||
|
fs = 'glsl',
|
||||||
|
gs = 'glsl',
|
||||||
|
tcs = 'glsl',
|
||||||
|
tes = 'glsl',
|
||||||
|
cs = 'glsl',
|
||||||
|
vert = 'glsl',
|
||||||
|
frag = 'glsl',
|
||||||
|
geom = 'glsl',
|
||||||
|
tess = 'glsl',
|
||||||
|
shd = 'glsl',
|
||||||
|
gls = 'glsl',
|
||||||
|
glsl = 'glsl',
|
||||||
|
rgen = 'glsl',
|
||||||
|
comp = 'glsl',
|
||||||
|
rchit = 'glsl',
|
||||||
|
rahit = 'glsl',
|
||||||
|
rmiss = 'glsl',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ require('lazy').setup({
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter.configs").setup {
|
require("nvim-treesitter.configs").setup {
|
||||||
ensure_installed = { "c", "cpp", "lua" },
|
ensure_installed = { 'c', 'cpp', 'lua' },
|
||||||
highlight = { enable = true, }
|
highlight = { enable = true, }
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
@ -100,12 +100,25 @@ require('lazy').setup({
|
||||||
{
|
{
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
config = function()
|
config = function()
|
||||||
-- Setup language servers.
|
-- Setup language servers
|
||||||
local wk = require("which-key")
|
-- Server-specific settings. See `:help lsp-quickstart`
|
||||||
local lspconfig = require('lspconfig')
|
vim.lsp.config('*', {
|
||||||
--lspconfig.clangd.setup {}
|
capabilities = {
|
||||||
--lspconfig.neocmake.setup {}
|
textDocument = {
|
||||||
|
semanticTokens = {
|
||||||
|
multilineTokenSupport = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
root_markers = { '.git' },
|
||||||
|
})
|
||||||
|
vim.lsp.config('clangd', {
|
||||||
|
cmd = { 'clangd', '--background-index', '--clang-tidy', '--log=verbose', '--header-insertion=never' },
|
||||||
|
filetypes = { 'c', 'cpp' }
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.enable('clangd')
|
||||||
|
local wk = require("which-key")
|
||||||
-- Global mappings.
|
-- Global mappings.
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||||
wk.add({
|
wk.add({
|
||||||
|
|
@ -228,13 +241,6 @@ require('lazy').setup({
|
||||||
{ name = 'cmdline' }
|
{ name = 'cmdline' }
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Set up lspconfig.
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
|
||||||
-- TODO Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
|
|
||||||
--[[require('lspconfig')['clangd'].setup {
|
|
||||||
capabilities = capabilities
|
|
||||||
}--]]
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -255,28 +261,3 @@ require('lazy').setup({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.filetype.add({
|
|
||||||
extension = {
|
|
||||||
vp = 'glsl',
|
|
||||||
fp = 'glsl',
|
|
||||||
gp = 'glsl',
|
|
||||||
vs = 'glsl',
|
|
||||||
fs = 'glsl',
|
|
||||||
gs = 'glsl',
|
|
||||||
tcs = 'glsl',
|
|
||||||
tes = 'glsl',
|
|
||||||
cs = 'glsl',
|
|
||||||
vert = 'glsl',
|
|
||||||
frag = 'glsl',
|
|
||||||
geom = 'glsl',
|
|
||||||
tess = 'glsl',
|
|
||||||
shd = 'glsl',
|
|
||||||
gls = 'glsl',
|
|
||||||
glsl = 'glsl',
|
|
||||||
rgen = 'glsl',
|
|
||||||
comp = 'glsl',
|
|
||||||
rchit = 'glsl',
|
|
||||||
rahit = 'glsl',
|
|
||||||
rmiss = 'glsl',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue