feat: some shit

This commit is contained in:
2023-08-21 14:43:53 +02:00
parent f0bc628dfc
commit 6b431704de
9 changed files with 78 additions and 74 deletions

View File

@ -72,18 +72,6 @@ autocmd({ "BufWinEnter" }, {
group = save_fold,
})
autocmd({ "BufWinEnter", "BufAdd" }, {
desc = 'hide statuscolumn in neotree',
group = vim.api.nvim_create_augroup('hide_nvimtree_stc', { clear = true }),
callback = function(opts)
if vim.bo[opts.buf].filetype == 'NvimTree' or vim.bo[opts.buf].filetype == "neo-tree" then
vim.opt.statuscolumn = ''
else
-- vim.opt.statuscolumn = [[%!v:lua.Status.column()]]
end
end,
})
vim.cmd([[
augroup filetypedetect
au BufNewFile,BufRead *.frag setl ft=glsl

View File

@ -52,17 +52,9 @@ opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
if vim.fn.has("nvim-0.9.0") == 1 then
opt.splitkeep = "screen"
opt.shortmess:append { C = true }
end
function _G.CustomFoldText()
return vim.fn.getline(vim.v.foldstart) .. ''
end
opt.fillchars = "fold: "
opt.foldtext = 'v:lua.CustomFoldText()'
opt.foldenable = false;
opt.foldmethod = "expr"
opt.foldexpr = "nvim_treesitter#foldexpr()"
-- Fix markdown indentation settings
vim.g.markdown_recommended_style = 0

View File

@ -61,10 +61,10 @@ return {
end
local capabilities = require("cmp_nvim_lsp").default_capabilities()
capabilities.textDocument.foldingRange = {
dynamicRegistration = false,
lineFoldingOnly = true,
}
-- capabilities.textDocument.foldingRange = {
-- dynamicRegistration = false,
-- lineFoldingOnly = true,
-- }
capabilities.textDocument.completion.completionItem.snippetSupport = true
local custom_lsp = {}

View File

@ -1,6 +1,7 @@
return {
"glepnir/lspsaga.nvim",
event = "BufRead",
enable = false,
opts = {
lightbulb = {
enable = false,

View File

@ -7,7 +7,7 @@ return {
--configuration goes here, for example:
relculright = false,
segments = {
{ text = { builtin.foldfunc }, click = "v:lua.ScFa" },
-- { text = { builtin.foldfunc }, click = "v:lua.ScFa" },
{
sign = { name = { "Diagnostic" }, maxwidth = 2, auto = true },
click = "v:lua.ScSa"

View File

@ -1,6 +1,7 @@
return {
"nvim-treesitter/nvim-treesitter",
event = "VeryLazy",
enable = false,
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
"JoosepAlviste/nvim-ts-context-commentstring",
@ -11,12 +12,25 @@ return {
context_commentstring = {
enable = true
},
ignore_install = {},
sync_install = false,
auto_install = true,
modules = {},
autotag = {
enable = true,
},
indent = {
enable = true,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = '<CR>',
scope_incremental = '<CR>',
node_incremental = '<TAB>',
node_decremental = '<S-TAB>',
},
},
ensure_installed = {
"bash",
"yaml",
@ -33,7 +47,10 @@ return {
"yaml",
"prisma",
},
highlight = { enable = true },
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
textobjects = {
select = {
enable = true,
@ -70,6 +87,9 @@ return {
},
},
})
vim.opt.foldenable = false;
vim.opt.foldmethod = "expr";
vim.opt.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
end,
build = ":TSUpdate",
}