style: change some nix formatting

This commit is contained in:
matt1432 2024-06-09 22:49:30 -04:00
parent 7ea031e84e
commit 158f0a6813
28 changed files with 84 additions and 137 deletions

View file

@ -25,13 +25,11 @@ in {
extraLuaConfig =
lib.mkIf neovimIde
/*
lua
*/
# lua
''
vim.api.nvim_create_autocmd('FileType', {
pattern = 'sh',
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
pattern = 'sh',
command = 'setlocal ts=4 sw=4 sts=0 expandtab',
});
require('lspconfig').bashls.setup(require('coq').lsp_ensure_capabilities({

View file

@ -17,9 +17,7 @@ in
];
extraLuaConfig =
/*
lua
*/
# lua
''
local lsp = require('lspconfig');
local coq = require('coq');

View file

@ -25,9 +25,7 @@ in {
neovim = {
extraLuaConfig =
lib.mkBefore
/*
lua
*/
# lua
''
-- Get rid of deprecated functions
vim.tbl_add_reverse_lookup = function(tbl)
@ -47,12 +45,12 @@ in {
-- Start completion / snippet stuff
vim.g.coq_settings = {
auto_start = 'shut-up',
keymap = {
recommended = false,
},
-- https://github.com/NixOS/nixpkgs/issues/168928#issuecomment-1109581739
xdg = true,
auto_start = 'shut-up',
keymap = {
recommended = false,
},
-- https://github.com/NixOS/nixpkgs/issues/168928#issuecomment-1109581739
xdg = true,
};
-- Add formatting cmd

View file

@ -9,9 +9,7 @@ in
programs = {
neovim = {
extraLuaConfig =
/*
lua
*/
# lua
''
vim.filetype.add({
pattern = { ['.*/hypr/.*%.conf'] = 'hyprlang' },

View file

@ -27,9 +27,7 @@ in
extraPackages = javaPkgs;
extraLuaConfig =
/*
lua
*/
# lua
''
vim.api.nvim_create_autocmd('FileType', {
pattern = 'java',
@ -43,10 +41,9 @@ in
plugin = vimPlugins.nvim-jdtls;
type = "lua";
config =
/*
lua
*/
# lua
''
--
local startJdtls = function()
local config = require('coq').lsp_ensure_capabilities({
cmd = { '${lib.getExe pkgs.jdt-language-server}' },

View file

@ -15,9 +15,7 @@ in
];
extraLuaConfig =
/*
lua
*/
# lua
''
vim.api.nvim_create_autocmd('FileType', {
pattern = 'yaml',

View file

@ -21,9 +21,7 @@ in
plugin = vimPlugins.neodev-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
vim.api.nvim_create_autocmd('FileType', {
pattern = 'lua',

View file

@ -27,9 +27,7 @@ in
];
extraLuaConfig =
/*
lua
*/
# lua
''
local lsp = require('lspconfig');
local coq = require('coq');
@ -53,9 +51,7 @@ in
plugin = buildPlugin "easytables-nvim" vimplugin-easytables-src;
type = "lua";
config =
/*
lua
*/
# lua
''
require('easytables').setup();
'';
@ -65,10 +61,9 @@ in
plugin = vimPlugins.knap;
type = "lua";
config =
/*
lua
*/
# lua
''
--
vim.api.nvim_create_autocmd('FileType', {
pattern = 'tex',
command = 'setlocal ts=4 sw=4 sts=0 expandtab',

View file

@ -47,17 +47,16 @@ in
];
extraLuaConfig =
/*
lua
*/
# lua
''
require('lspconfig').nixd.setup(require('coq').lsp_ensure_capabilities({
filetypes = { 'nix', 'in.nix' },
settings = {
nixd = {
formatting = {
command = { '${lib.getExe pkgs.alejandra}' },
},
formatting = {
-- TODO: Try to find <flake>.formatter
command = { '${lib.getExe pkgs.alejandra}' },
},
},
},
}));

View file

@ -16,9 +16,7 @@ in
];
extraLuaConfig =
/*
lua
*/
# lua
''
require('lspconfig').basedpyright.setup(
require('coq').lsp_ensure_capabilities({}));

View file

@ -17,9 +17,7 @@ in
];
extraLuaConfig =
/*
lua
*/
# lua
''
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'rust' },

View file

@ -30,9 +30,7 @@ in
];
extraLuaConfig =
/*
lua
*/
# lua
''
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'javascript', 'typescript', 'css', 'scss' },