Merge branch 'master' of https://git.cscherr.de/PlexSheep/neovim-confs
This commit is contained in:
commit
5e07d14aff
7 changed files with 172 additions and 146 deletions
3
init.lua
3
init.lua
|
@ -172,9 +172,6 @@ end, {
|
|||
desc = 'Enable autoformat',
|
||||
bang = true,
|
||||
})
|
||||
vim.api.nvim_create_user_command('TypstPinMain', function()
|
||||
vim.lsp.buf.execute_command { command = 'tinymist.pinMain', arguments = { vim.api.nvim_buf_get_name(0) } }
|
||||
end, { nargs = 0 })
|
||||
|
||||
-- autocommands
|
||||
-- ===
|
||||
|
|
|
@ -98,9 +98,6 @@ vim.api.nvim_create_autocmd('FileType', {
|
|||
'typst',
|
||||
},
|
||||
callback = function()
|
||||
-- pin the main file
|
||||
vim.lsp.buf.execute_command { command = 'tinymist.pinMain', arguments = { vim.api.nvim_buf_get_name(0) } }
|
||||
-- -- unpin the main file
|
||||
-- vim.lsp.buf.execute_command { command = 'tinymist.pinMain', arguments = { nil } }
|
||||
print "Don't forget to pin the main typst file for multifile support: <leader>tp"
|
||||
end,
|
||||
})
|
||||
|
|
|
@ -127,34 +127,38 @@ capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp'
|
|||
-- - settings (table): Override the default settings passed when initializing the server.
|
||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||
-- https://github.com/pmizio/typescript-tools.nvim
|
||||
--
|
||||
-- But for many setups, the LSP (`tsserver`) will work just fine
|
||||
-- tsserver = {},
|
||||
--
|
||||
|
||||
tinymist = {
|
||||
settings = {
|
||||
formatterMode = 'typstyle',
|
||||
exportPdf = 'never',
|
||||
semanticTokens = 'disable',
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
vim.keymap.set('n', '<leader>tp', function()
|
||||
client:exec_cmd({
|
||||
title = 'pin',
|
||||
command = 'tinymist.pinMain',
|
||||
arguments = { vim.api.nvim_buf_get_name(0) },
|
||||
}, { bufnr = bufnr })
|
||||
end, { desc = '[T]oggle [P]in (pin this file as main file)', noremap = true })
|
||||
|
||||
vim.keymap.set('n', '<leader>tu', function()
|
||||
client:exec_cmd({
|
||||
title = 'unpin',
|
||||
command = 'tinymist.pinMain',
|
||||
arguments = { vim.v.null },
|
||||
}, { bufnr = bufnr })
|
||||
end, { desc = '[T]oggle [U]npin (unpin this file as main file)', noremap = true })
|
||||
end,
|
||||
},
|
||||
html = {},
|
||||
ts_ls = {},
|
||||
cssls = {},
|
||||
ts_ls = {},
|
||||
clangd = {},
|
||||
pyright = {},
|
||||
bashls = {},
|
||||
yamlls = {},
|
||||
texlab = {},
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
['rust-analyzer'] = {
|
||||
|
@ -203,23 +207,27 @@ require('mason').setup()
|
|||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
'stylua',
|
||||
'typstfmt',
|
||||
'typstyle',
|
||||
'prettier',
|
||||
'rust-analyzer',
|
||||
'clangd',
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
-- This handles overriding only values explicitly passed
|
||||
-- by the server configuration above. Useful when disabling
|
||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
require('lspconfig')[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
ensure_installed = ensure_installed,
|
||||
automatic_installation = true,
|
||||
automatic_enable = true,
|
||||
}
|
||||
|
||||
-- some things work weird
|
||||
local lspconfig = require 'lspconfig'
|
||||
|
||||
for server_name, server in pairs(servers) do
|
||||
-- This handles overriding only values explicitly passed
|
||||
-- by the server configuration above. Useful when disabling
|
||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
require('lspconfig')[server_name].setup(server)
|
||||
end
|
||||
|
||||
lspconfig.gdscript.setup {}
|
||||
|
|
|
@ -36,6 +36,7 @@ return {
|
|||
end,
|
||||
formatters_by_ft = {
|
||||
['_'] = { 'prettier' },
|
||||
rust = { 'rust-analyzer' },
|
||||
lua = { 'stylua' },
|
||||
json = { 'jq' },
|
||||
-- rust = { 'rustfmt' }, -- does not need one with the lsp there
|
||||
|
@ -47,7 +48,7 @@ return {
|
|||
--
|
||||
-- You can use a sub-list to tell conform to run *until* a formatter
|
||||
-- is found.
|
||||
javascript = { 'prettierd', 'prettier' },
|
||||
javascript = { 'prettier' },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -22,6 +22,7 @@ return {
|
|||
|
||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
|
||||
{ 'echasnovski/mini.icons', version = '*' },
|
||||
},
|
||||
config = function()
|
||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
||||
|
|
|
@ -1,117 +1,124 @@
|
|||
the_themes = {
|
||||
-- Dark Themes
|
||||
{
|
||||
name = '==========Dark Themes==========',
|
||||
colorscheme = '', -- this actually keeps the selected theme, but it wont work with persistence
|
||||
},
|
||||
{
|
||||
name = 'nvim default',
|
||||
colorscheme = 'default',
|
||||
},
|
||||
{
|
||||
name = 'nvim lunaperche',
|
||||
colorscheme = 'lunaperche',
|
||||
},
|
||||
{
|
||||
name = 'nvim quiet',
|
||||
colorscheme = 'quiet',
|
||||
},
|
||||
{
|
||||
name = 'nvim retrobox',
|
||||
colorscheme = 'retrobox',
|
||||
},
|
||||
{
|
||||
name = 'nvim slate',
|
||||
colorscheme = 'slate',
|
||||
},
|
||||
{
|
||||
name = 'nvim vim',
|
||||
colorscheme = 'vim',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight',
|
||||
colorscheme = 'tokyonight',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-moon',
|
||||
colorscheme = 'tokyonight-moon',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-storm',
|
||||
colorscheme = 'tokyonight-storm',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa',
|
||||
colorscheme = 'kanagawa',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-dragon',
|
||||
colorscheme = 'kanagawa-dragon',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-wave',
|
||||
colorscheme = 'kanagawa-wave',
|
||||
},
|
||||
{
|
||||
name = 'zenbones',
|
||||
colorscheme = 'zenbones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
{
|
||||
name = 'tokyobones',
|
||||
colorscheme = 'tokyobones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
{
|
||||
name = 'kanagawabones',
|
||||
colorscheme = 'kanagawabones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
'catppuccin-frappe',
|
||||
'catppuccin-macchiato',
|
||||
'catppuccin-mocha',
|
||||
'rose-pine-main',
|
||||
'rose-pine-moon',
|
||||
'cyberdream',
|
||||
-- Light themes
|
||||
{
|
||||
name = '==========Light Themes==========',
|
||||
colorscheme = '', -- this actually keeps the selected theme, but it wont work with persistence
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-day',
|
||||
colorscheme = 'tokyonight-day',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-lotus',
|
||||
colorscheme = 'kanagawa-lotus',
|
||||
},
|
||||
{
|
||||
name = 'zenbones',
|
||||
colorscheme = 'zenbones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "light"
|
||||
]],
|
||||
},
|
||||
'catppuccin-latte',
|
||||
'rose-pine-dawn',
|
||||
'cyberdream-light',
|
||||
}
|
||||
|
||||
return {
|
||||
{
|
||||
'zaldih/themery.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
lazy = false,
|
||||
cmd = 'Themery',
|
||||
keys = {
|
||||
{ ';ft', '<cmd> Themery <cr>', desc = '[F]ind [T]heme' },
|
||||
},
|
||||
init = function()
|
||||
require 'settings.theme'
|
||||
end,
|
||||
config = function()
|
||||
require('themery').setup {
|
||||
themes = {
|
||||
-- Dark Themes
|
||||
{
|
||||
name = '==========Dark Themes==========',
|
||||
colorscheme = '', -- this actually keeps the selected theme, but it wont work with persistence
|
||||
},
|
||||
{
|
||||
name = 'nvim default',
|
||||
colorscheme = 'default',
|
||||
},
|
||||
{
|
||||
name = 'nvim lunaperche',
|
||||
colorscheme = 'lunaperche',
|
||||
},
|
||||
{
|
||||
name = 'nvim quiet',
|
||||
colorscheme = 'quiet',
|
||||
},
|
||||
{
|
||||
name = 'nvim retrobox',
|
||||
colorscheme = 'retrobox',
|
||||
},
|
||||
{
|
||||
name = 'nvim slate',
|
||||
colorscheme = 'slate',
|
||||
},
|
||||
{
|
||||
name = 'nvim vim',
|
||||
colorscheme = 'vim',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight',
|
||||
colorscheme = 'tokyonight',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-moon',
|
||||
colorscheme = 'tokyonight-moon',
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-storm',
|
||||
colorscheme = 'tokyonight-storm',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa',
|
||||
colorscheme = 'kanagawa',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-dragon',
|
||||
colorscheme = 'kanagawa-dragon',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-wave',
|
||||
colorscheme = 'kanagawa-wave',
|
||||
},
|
||||
{
|
||||
name = 'zenbones',
|
||||
colorscheme = 'zenbones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
{
|
||||
name = 'tokyobones',
|
||||
colorscheme = 'tokyobones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
{
|
||||
name = 'kanagawabones',
|
||||
colorscheme = 'kanagawabones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "dark"
|
||||
]],
|
||||
},
|
||||
-- Light themes
|
||||
{
|
||||
name = '==========Light Themes==========',
|
||||
colorscheme = '', -- this actually keeps the selected theme, but it wont work with persistence
|
||||
},
|
||||
{
|
||||
name = 'tokyonight-day',
|
||||
colorscheme = 'tokyonight-day',
|
||||
},
|
||||
{
|
||||
name = 'kanagawa-lotus',
|
||||
colorscheme = 'kanagawa-lotus',
|
||||
},
|
||||
{
|
||||
name = 'zenbones',
|
||||
colorscheme = 'zenbones',
|
||||
before = [[
|
||||
-- It's a major hack from the themery guys that this is a string
|
||||
vim.opt.background = "light"
|
||||
]],
|
||||
},
|
||||
},
|
||||
themeConfigFile = '~/.config/nvim/lua/settings/theme.lua',
|
||||
themes = the_themes,
|
||||
livePreview = true, -- Apply theme while browsing. Default to true.
|
||||
}
|
||||
end,
|
||||
|
@ -119,4 +126,26 @@ return {
|
|||
'folke/tokyonight.nvim',
|
||||
'rebelot/kanagawa.nvim',
|
||||
{ 'zenbones-theme/zenbones.nvim', dependencies = { 'rktjmp/lush.nvim' } },
|
||||
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
|
||||
{ 'rose-pine/neovim', name = 'rose-pine' },
|
||||
{
|
||||
'scottmckendry/cyberdream.nvim',
|
||||
setup = function()
|
||||
require('cyberdream').setup {
|
||||
-- Enable transparent background
|
||||
transparent = true,
|
||||
italic_comments = false,
|
||||
-- Replace all fillchars with ' ' for the ultimate clean look
|
||||
hide_fillchars = false,
|
||||
borderless_pickers = true,
|
||||
terminal_colors = true,
|
||||
cache = true,
|
||||
extensions = {
|
||||
telescope = true,
|
||||
notify = true,
|
||||
mini = true,
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
-- Use `git update-index --assume-unchanged <file>` to ignore changes in this file
|
||||
--
|
||||
-- Themery block
|
||||
-- This block will be replaced by Themery.
|
||||
vim.cmd("colorscheme tokyonight-storm")
|
||||
vim.g.theme_id = 10
|
||||
-- end themery block
|
Loading…
Add table
Reference in a new issue