mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-08 09:24:17 +01:00
nix: Add syntax highlighting to strings
Note that alejandra currently does not handle these comments properly. See: https://github.com/kamadorueda/alejandra/issues/366
This commit is contained in:
parent
e42bfc091a
commit
31ad806ce7
@ -16,7 +16,7 @@ in {
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
extraConfig = /* vim */ ''
|
||||
filetype plugin indent on
|
||||
set undofile
|
||||
set spell
|
||||
@ -74,7 +74,7 @@ in {
|
||||
{
|
||||
plugin = nvim-tree-lua;
|
||||
type = "lua";
|
||||
config = ''
|
||||
config = /* lua */ ''
|
||||
require("nvim-tree").setup()
|
||||
|
||||
vim.api.nvim_create_autocmd({"QuitPre"}, {
|
||||
@ -121,36 +121,36 @@ in {
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = "
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.nil_ls.setup {}
|
||||
lspconfig.rust_analyzer.setup {}
|
||||
lspconfig.marksman.setup {}
|
||||
lspconfig.gopls.setup {}
|
||||
lspconfig.lua_ls.setup {}
|
||||
lspconfig.clangd.setup {}
|
||||
lspconfig.texlab.setup {}
|
||||
lspconfig.crystalline.setup {}
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
||||
end,
|
||||
})
|
||||
";
|
||||
config = /* lua */ ''
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.nil_ls.setup {}
|
||||
lspconfig.rust_analyzer.setup {}
|
||||
lspconfig.marksman.setup {}
|
||||
lspconfig.gopls.setup {}
|
||||
lspconfig.lua_ls.setup {}
|
||||
lspconfig.clangd.setup {}
|
||||
lspconfig.texlab.setup {}
|
||||
lspconfig.crystalline.setup {}
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
local opts = { buffer = ev.buf }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
|
||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
||||
end,
|
||||
})
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-base16;
|
||||
@ -160,7 +160,7 @@ in {
|
||||
{
|
||||
plugin = lualine-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
config = /* lua */ ''
|
||||
local theme = require("lualine.themes.base16")
|
||||
theme.normal.b.bg = nil
|
||||
theme.normal.c.bg = nil
|
||||
@ -206,7 +206,7 @@ in {
|
||||
}
|
||||
{
|
||||
plugin = vimtex;
|
||||
config = ''
|
||||
config = /* vim */ ''
|
||||
" Disable all keybinds so we can define our own
|
||||
let g:vimtex_mappings_enabled = 0
|
||||
let g:vimtex_imaps_enabled = 0
|
||||
@ -222,7 +222,7 @@ in {
|
||||
}
|
||||
{
|
||||
plugin = vim-startify;
|
||||
config = ''
|
||||
config = /* vim */ ''
|
||||
let g:startify_custom_header = startify#pad(split(system("${pkgs.fish}/bin/fish -c 'cat (random choice (${pkgs.fd}/bin/fd . ${pkgs.ponysay}/share/ponysay/quotes --ignore-file ~/.config/fd/ponyignore))'"), '\n'))
|
||||
|
||||
let g:startify_change_to_dir = 0
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
xdg.configFile."waycorner/config.toml".text = ''
|
||||
xdg.configFile."waycorner/config.toml".text = /* toml */ ''
|
||||
[application_launcher]
|
||||
enter_command = [ "hyprctl", "dispatch", "workspace", "empty" ]
|
||||
exit_command = [ "${pkgs.lnch}/bin/lnch", "${pkgs.rofi}/bin/rofi", "-show", "drun" ]
|
||||
|
Loading…
Reference in New Issue
Block a user