mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-06-21 18:21:31 +02: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 = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = /* vim */ ''
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
set undofile
|
set undofile
|
||||||
set spell
|
set spell
|
||||||
@ -74,7 +74,7 @@ in {
|
|||||||
{
|
{
|
||||||
plugin = nvim-tree-lua;
|
plugin = nvim-tree-lua;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''
|
config = /* lua */ ''
|
||||||
require("nvim-tree").setup()
|
require("nvim-tree").setup()
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({"QuitPre"}, {
|
vim.api.nvim_create_autocmd({"QuitPre"}, {
|
||||||
@ -121,36 +121,36 @@ in {
|
|||||||
{
|
{
|
||||||
plugin = nvim-lspconfig;
|
plugin = nvim-lspconfig;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = "
|
config = /* lua */ ''
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
lspconfig.nil_ls.setup {}
|
lspconfig.nil_ls.setup {}
|
||||||
lspconfig.rust_analyzer.setup {}
|
lspconfig.rust_analyzer.setup {}
|
||||||
lspconfig.marksman.setup {}
|
lspconfig.marksman.setup {}
|
||||||
lspconfig.gopls.setup {}
|
lspconfig.gopls.setup {}
|
||||||
lspconfig.lua_ls.setup {}
|
lspconfig.lua_ls.setup {}
|
||||||
lspconfig.clangd.setup {}
|
lspconfig.clangd.setup {}
|
||||||
lspconfig.texlab.setup {}
|
lspconfig.texlab.setup {}
|
||||||
lspconfig.crystalline.setup {}
|
lspconfig.crystalline.setup {}
|
||||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
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_prev)
|
||||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
||||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
|
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
local opts = { buffer = ev.buf }
|
local opts = { buffer = ev.buf }
|
||||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, 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', 'K', vim.lsp.buf.hover, opts)
|
||||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, 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', '<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>D', vim.lsp.buf.type_definition, opts)
|
||||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, 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', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
|
||||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
";
|
'';
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = nvim-base16;
|
plugin = nvim-base16;
|
||||||
@ -160,7 +160,7 @@ in {
|
|||||||
{
|
{
|
||||||
plugin = lualine-nvim;
|
plugin = lualine-nvim;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''
|
config = /* lua */ ''
|
||||||
local theme = require("lualine.themes.base16")
|
local theme = require("lualine.themes.base16")
|
||||||
theme.normal.b.bg = nil
|
theme.normal.b.bg = nil
|
||||||
theme.normal.c.bg = nil
|
theme.normal.c.bg = nil
|
||||||
@ -206,7 +206,7 @@ in {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = vimtex;
|
plugin = vimtex;
|
||||||
config = ''
|
config = /* vim */ ''
|
||||||
" Disable all keybinds so we can define our own
|
" Disable all keybinds so we can define our own
|
||||||
let g:vimtex_mappings_enabled = 0
|
let g:vimtex_mappings_enabled = 0
|
||||||
let g:vimtex_imaps_enabled = 0
|
let g:vimtex_imaps_enabled = 0
|
||||||
@ -222,7 +222,7 @@ in {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
plugin = vim-startify;
|
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_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
|
let g:startify_change_to_dir = 0
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
{
|
{
|
||||||
xdg.configFile."waycorner/config.toml".text = ''
|
xdg.configFile."waycorner/config.toml".text = /* toml */ ''
|
||||||
[application_launcher]
|
[application_launcher]
|
||||||
enter_command = [ "hyprctl", "dispatch", "workspace", "empty" ]
|
enter_command = [ "hyprctl", "dispatch", "workspace", "empty" ]
|
||||||
exit_command = [ "${pkgs.lnch}/bin/lnch", "${pkgs.rofi}/bin/rofi", "-show", "drun" ]
|
exit_command = [ "${pkgs.lnch}/bin/lnch", "${pkgs.rofi}/bin/rofi", "-show", "drun" ]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user