QML INDENTATION POGGERS

This commit is contained in:
Zacharias-Brohn
2026-03-17 15:40:11 +01:00
parent db2b2d364f
commit c83a164a1c
7 changed files with 508 additions and 33 deletions
+9 -8
View File
@@ -22,7 +22,7 @@ end
local function spell()
if vim.o.spell then
return string.format("[SPELL]")
return string.format "[SPELL]"
end
return ""
@@ -31,7 +31,8 @@ end
--- show indicator for Chinese IME
local function ime_state()
if vim.g.is_mac then
local layout = fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "")
local layout =
fn.libcall(vim.g.XkbSwitchLib, "Xkb_Switch_getXkbLayout", "")
local res = fn.match(layout, [[\v(Squirrel\.Rime|SCIM.ITABC)]])
if res ~= -1 then
return "[CN]"
@@ -58,8 +59,8 @@ local virtual_env = function()
return ""
end
local conda_env = os.getenv("CONDA_DEFAULT_ENV")
local venv_path = os.getenv("VIRTUAL_ENV")
local conda_env = os.getenv "CONDA_DEFAULT_ENV"
local venv_path = os.getenv "VIRTUAL_ENV"
if venv_path == nil then
if conda_env == nil then
@@ -85,10 +86,10 @@ require("lualine").setup {
laststatus = 0,
options = {
icons_enabled = true,
theme = "auto",
theme = "zshell",
globalstatus = true,
component_separators = '',
section_separators = { left = '', right = '' },
component_separators = "",
section_separators = { left = "", right = "" },
disabled_filetypes = {},
always_divide_middle = true,
},
@@ -158,7 +159,7 @@ require("lualine").setup {
error = icons.diagnostics.Error,
warn = icons.diagnostics.Warn,
info = icons.diagnostics.Info,
hint = icons.diagnostics.Hint
hint = icons.diagnostics.Hint,
},
},
},
+4 -7
View File
@@ -2,14 +2,11 @@ local treesitter = require "nvim-treesitter"
treesitter.install { "all" }
local parsers = treesitter.get_installed()
vim.api.nvim_create_autocmd("FileType", {
callback = function(args)
local has_parser = pcall(vim.treesitter.get_parser, args.buf)
if not has_parser then
return
end
pattern = parsers,
callback = function()
vim.treesitter.start()
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,