diff --git a/nvim/lua/keybinds.lua b/nvim/lua/keybinds.lua index 1ae70d2..d70f715 100755 --- a/nvim/lua/keybinds.lua +++ b/nvim/lua/keybinds.lua @@ -90,7 +90,7 @@ keymap.set("n", "r", ":!%:p", opts("run current file with argume keymap.set("n", "m", ":!chmod +x %:p", opts("make current file executable")) -- script setup -keymap.set("n", "#", ":set syntax=sh:w:!chmod +x %:p:LspStart bashlsi#!/bin/sh", opts("setup sh script")) +keymap.set("n", "#", ":w:!chmod +x %:pggi#!/bin/sh:setfiletype bash", opts("setup sh script")) keymap.set("n", "#", ":set syntax=python:w:!chmod +x %:p:LspStart pyrighti#!/usr/bin/env python3", opts("setup python script")) -- select all diff --git a/nvim/lua/plugins/lsp/none-ls.lua b/nvim/lua/plugins/lsp/none-ls.lua index 226c2ca..7e3a907 100755 --- a/nvim/lua/plugins/lsp/none-ls.lua +++ b/nvim/lua/plugins/lsp/none-ls.lua @@ -1,5 +1,8 @@ return { "nvimtools/none-ls.nvim", + dependencies = { + 'nvimtools/none-ls-extras.nvim' + }, config = function() local null_ls = require("null-ls") @@ -7,31 +10,41 @@ return { sources = { null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.prettier.with({ + filetypes = { + "css", + "scss", + "less", + "html", + "json", + "yaml", + "markdown", + "graphql", + }, extra_args = { - "--print-width", - "120", + "--print-width", + "120", "--tab-width", "4", "--bracket-spacing", "true", "--arrow-parens", "avoid", - "--jsx-single-quote", - "true", - "--trailing-comma", - "es5", - "--no-semi", - "false", - "--single-quote", - "true", - "--bracket-same-line", - "true", - "--vue-indent-script-and-style", - "true" + "--jsx-single-quote", + "true", + "--trailing-comma", + "es5", + "--no-semi", + "false", + "--single-quote", + "true", + "--bracket-same-line", + "true", + "--vue-indent-script-and-style", + "true", }, }), null_ls.builtins.formatting.shfmt, - null_ls.builtins.diagnostics.eslint, + require( 'none-ls.formatting.eslint' ), null_ls.builtins.formatting.black, }, })