Switch to Rosé Pine Moon theme, add autosave on InsertLeave, fix lint executable check
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3fa066dbc0
commit
dd2537cd30
26
init.lua
26
init.lua
|
|
@ -248,6 +248,14 @@ vim.api.nvim_create_user_command('LlamaStop', function()
|
||||||
vim.notify('llama-server stopped', vim.log.levels.INFO)
|
vim.notify('llama-server stopped', vim.log.levels.INFO)
|
||||||
end, { desc = 'Stop llama-server' })
|
end, { desc = 'Stop llama-server' })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('InsertLeave', {
|
||||||
|
callback = function()
|
||||||
|
if vim.bo.modified and vim.bo.buftype == '' and vim.fn.expand '%' ~= '' then
|
||||||
|
vim.cmd 'silent! write'
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('VimLeavePre', {
|
vim.api.nvim_create_autocmd('VimLeavePre', {
|
||||||
callback = function()
|
callback = function()
|
||||||
if llama_job_id then
|
if llama_job_id then
|
||||||
|
|
@ -869,20 +877,12 @@ require('lazy').setup({
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
-- change the command in the config to whatever the name of that colorscheme is.
|
||||||
--
|
--
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
'folke/tokyonight.nvim',
|
'rose-pine/neovim',
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
name = 'rose-pine',
|
||||||
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
---@diagnostic disable-next-line: missing-fields
|
require('rose-pine').setup { variant = 'moon' }
|
||||||
require('tokyonight').setup {
|
vim.cmd.colorscheme 'rose-pine'
|
||||||
styles = {
|
|
||||||
comments = { italic = false }, -- Disable italics in comments
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Load the colorscheme here.
|
|
||||||
-- Like many other themes, this one has different styles, and you could load
|
|
||||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
|
||||||
vim.cmd.colorscheme 'tokyonight-night'
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,11 @@ return {
|
||||||
-- describe the hovered symbol using Markdown.
|
-- describe the hovered symbol using Markdown.
|
||||||
if vim.bo.modifiable then
|
if vim.bo.modifiable then
|
||||||
local linters = lint.linters_by_ft[vim.bo.filetype] or {}
|
local linters = lint.linters_by_ft[vim.bo.filetype] or {}
|
||||||
local available = vim.tbl_filter(function(l) return vim.fn.executable(lint.linters[l] and lint.linters[l].cmd or l) == 1 end, linters)
|
local available = vim.tbl_filter(function(l)
|
||||||
|
local linter = lint.linters[l]
|
||||||
|
local cmd = type(linter) == 'table' and linter.cmd or l
|
||||||
|
return type(cmd) == 'string' and vim.fn.executable(cmd) == 1
|
||||||
|
end, linters)
|
||||||
if #available > 0 then lint.try_lint(available) end
|
if #available > 0 then lint.try_lint(available) end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue