1
0
Fork 0

Oh my little refactor

This commit is contained in:
CRy386i 2025-07-11 20:11:11 +03:00
parent ff494a0caa
commit 82987a454c
2 changed files with 46 additions and 39 deletions

View file

@ -35,3 +35,29 @@ opt.langmap = "ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ;ABCDEFGHIJKL
opt.colorcolumn = "120"
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',
}
})

View file

@ -71,7 +71,7 @@ require('lazy').setup({
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
-- the default case_mode is "smart_case"
}
}
}
@ -92,7 +92,7 @@ require('lazy').setup({
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup {
ensure_installed = { "c", "cpp", "lua" },
ensure_installed = { 'c', 'cpp', 'lua' },
highlight = { enable = true, }
}
end
@ -100,12 +100,25 @@ require('lazy').setup({
{
'neovim/nvim-lspconfig',
config = function()
-- Setup language servers.
local wk = require("which-key")
local lspconfig = require('lspconfig')
--lspconfig.clangd.setup {}
--lspconfig.neocmake.setup {}
-- Setup language servers
-- Server-specific settings. See `:help lsp-quickstart`
vim.lsp.config('*', {
capabilities = {
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.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
wk.add({
@ -228,13 +241,6 @@ require('lazy').setup({
{ 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,
},
{
@ -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',
}
})