removed alpha and added typst specific rules

This commit is contained in:
gwslingerland 2026-01-07 14:02:03 +01:00
parent 62851958e7
commit ed984140f4
3 changed files with 33 additions and 19 deletions

5
ftplugin/typst.lua Normal file
View File

@ -0,0 +1,5 @@
local opt = vim.opt_local
opt.wrap = true
opt.linebreak = true
opt.textwidth = 0

View File

@ -159,7 +159,7 @@ vim.o.inccommand = 'split'
vim.o.cursorline = true vim.o.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor. -- Minimal number of screen lines to keep above and below the cursor.
vim.o.scrolloff = 0 vim.o.scrolloff = 5
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
-- instead raise a dialog asking if you wish to save the current file(s) -- instead raise a dialog asking if you wish to save the current file(s)
@ -219,6 +219,18 @@ vim.api.nvim_create_autocmd('TextYankPost', {
end, end,
}) })
-- Typst line wrapping settings
vim.api.nvim_create_autocmd('FileType', {
pattern = 'typ', -- applies to .typ files
callback = function()
local opt = vim.opt_local
opt.wrap = true -- soft wrap long lines
opt.linebreak = true -- wrap at word boundaries, not mid-word
opt.textwidth = 0 -- disable automatic line breaks
opt.showbreak = '' -- optional: visual indicator for wrapped lines
end,
})
-- [[ Install `lazy.nvim` plugin manager ]] -- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
@ -698,6 +710,7 @@ require('lazy').setup({
}, },
}, },
}, },
tinymist = {},
} }
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
@ -918,22 +931,6 @@ require('lazy').setup({
-- - sd' - [S]urround [D]elete [']quotes -- - sd' - [S]urround [D]elete [']quotes
-- - sr)' - [S]urround [R]eplace [)] ['] -- - sr)' - [S]urround [R]eplace [)] [']
require('mini.surround').setup() require('mini.surround').setup()
-- Simple and easy statusline.
-- You could remove this setup call if you don't like it,
-- and try some other statusline plugin
local statusline = require 'mini.statusline'
-- set use_icons to true if you have a Nerd Font
statusline.setup { use_icons = vim.g.have_nerd_font }
-- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we set the section for
-- cursor location to LINE:COLUMN
---@diagnostic disable-next-line: duplicate-set-field
statusline.section_location = function()
return '%2l:%-2v'
end
-- ... and there is more! -- ... and there is more!
-- Check out: https://github.com/echasnovski/mini.nvim -- Check out: https://github.com/echasnovski/mini.nvim
end, end,
@ -984,7 +981,7 @@ require('lazy').setup({
-- This is the easiest way to modularize your config. -- This is the easiest way to modularize your config.
-- --
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' }, { import = 'custom.plugins' },
-- --
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope! -- Or use telescope!

View File

@ -2,4 +2,16 @@
-- I promise not to create any merge conflicts in this directory :) -- I promise not to create any merge conflicts in this directory :)
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information
return {} return {
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
opts = { options = { theme = 'tokyonight' } },
},
{
'chomosuke/typst-preview.nvim',
lazy = false, -- or ft = 'typst'
version = '1.*',
opts = {}, -- lazy.nvim will implicitly calls `setup {}`
},
}