-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
71 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
local options = { | ||
formatters_by_ft = { | ||
lua = { "stylua" }, | ||
typescript = { { "prettierd", "prettier" }, "eslint_d" }, | ||
}, | ||
} | ||
|
||
require("conform").setup(options) | ||
|
||
-- This should be okay to set globally, as will default back to the LSP | ||
-- formatexpr if present and then to nothing. | ||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" | ||
-- local options = { | ||
-- formatters_by_ft = { | ||
-- lua = { "stylua" }, | ||
-- typescript = { { "prettierd", "prettier" }, "eslint_d" }, | ||
-- }, | ||
-- } | ||
-- | ||
-- require("conform").setup(options) | ||
-- | ||
-- -- This should be okay to set globally, as will default back to the LSP | ||
-- -- formatexpr if present and then to nothing. | ||
-- vim.o.formatexpr = "v:lua.require'conform'.formatexpr()" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
require("lint").linters_by_ft = { | ||
lua = { "luacheck" }, | ||
typescript = { "eslint" }, | ||
} | ||
|
||
-- This will run the linters on save. | ||
vim.api.nvim_create_autocmd({ "BufWritePost" }, { | ||
callback = function() | ||
require("lint").try_lint() | ||
end, | ||
}) | ||
-- require("lint").linters_by_ft = { | ||
-- lua = { "luacheck" }, | ||
-- typescript = { "eslint" }, | ||
-- } | ||
-- | ||
-- -- This will run the linters on save. | ||
-- vim.api.nvim_create_autocmd({ "BufWritePost" }, { | ||
-- callback = function() | ||
-- require("lint").try_lint() | ||
-- end, | ||
-- }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
local ok, treesitter_configs = pcall(require, "nvim-treesitter.configs") | ||
if not ok then | ||
return | ||
end | ||
treesitter_configs.setup({ | ||
-- A list of parser names, or "all" | ||
ensure_installed = { "lua" }, | ||
|
||
-- Install parsers synchronously (only applied to `ensure_installed`) | ||
sync_install = false, | ||
|
||
-- Automatically install missing parsers when entering buffer | ||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally | ||
auto_install = true, | ||
|
||
highlight = { | ||
enable = true, | ||
|
||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time. | ||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). | ||
-- Using this option may slow down your editor, and you may see some duplicate highlights. | ||
-- Instead of true it can also be a list of languages | ||
additional_vim_regex_highlighting = false, | ||
}, | ||
}) | ||
-- local ok, treesitter_configs = pcall(require, "nvim-treesitter.configs") | ||
-- if not ok then | ||
-- return | ||
-- end | ||
-- treesitter_configs.setup({ | ||
-- -- A list of parser names, or "all" | ||
-- ensure_installed = { "lua" }, | ||
-- | ||
-- -- Install parsers synchronously (only applied to `ensure_installed`) | ||
-- sync_install = false, | ||
-- | ||
-- -- Automatically install missing parsers when entering buffer | ||
-- -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally | ||
-- auto_install = true, | ||
-- | ||
-- highlight = { | ||
-- enable = true, | ||
-- | ||
-- -- Setting this to true will run `:h syntax` and tree-sitter at the same time. | ||
-- -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). | ||
-- -- Using this option may slow down your editor, and you may see some duplicate highlights. | ||
-- -- Instead of true it can also be a list of languages | ||
-- additional_vim_regex_highlighting = false, | ||
-- }, | ||
-- }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
vim.opt.runtimepath:append( | ||
vim.fs.joinpath( | ||
vim.fn.stdpath("data") --[[@as string]], | ||
"rocks", | ||
"lib", | ||
"luarocks", | ||
"rocks-5.1", | ||
"tree-sitter-*", | ||
"*" | ||
) | ||
) | ||
vim.api.nvim_create_autocmd("FileType", { | ||
callback = function() | ||
pcall(vim.treesitter.start) | ||
end, | ||
}) |