Add dockerfile treesitter

nix-components
pegasust 2022-09-06 23:06:13 -07:00
parent 019a04c5b2
commit 6e4b9d5a71
1 changed files with 22 additions and 1 deletions

View File

@ -5,6 +5,10 @@
-- - Auto-complete (in insert mode: ctrl-space, navigate w/ Tab+S-Tab, confirm: Enter) -- - Auto-complete (in insert mode: ctrl-space, navigate w/ Tab+S-Tab, confirm: Enter)
-- - cmd: ":Format" to format -- - cmd: ":Format" to format
-- - Harpoon marks: Navigate through main files within each project -- - Harpoon marks: Navigate through main files within each project
--
-- REQUIREMENTS:
-- - zk @ https://github.com/mickael-menu/zk
-- - prettierd @ npm install -g @fsouza/prettierd
-- Basic settings of vim -- Basic settings of vim
vim.cmd([[ vim.cmd([[
@ -161,6 +165,7 @@ require('telescope').setup {
} }
} }
-- Telescope key remap stuffs
pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'fzf')
pcall(require('telescope').load_extension, 'file_browser') pcall(require('telescope').load_extension, 'file_browser')
remap('n', '<C-p>', '<cmd>Telescope<cr>', { desc = 'Open Telescope general search' }) remap('n', '<C-p>', '<cmd>Telescope<cr>', { desc = 'Open Telescope general search' })
@ -201,9 +206,21 @@ remap('n', '<leader>fd', function()
require('telescope.builtin').diagnostics() require('telescope.builtin').diagnostics()
end, { desc = '[F]ind [D]iagnostics' }) end, { desc = '[F]ind [D]iagnostics' })
-- ZK remap stuffs
remap('n', '<leader>zf', function()
vim.cmd([[:ZkNotes]])
end, { desc = '[Z]ettelkasten [F]iles' })
remap('n', '<leader>zg', function()
vim.cmd([[:ZkGrep]])
end, { desc = '[Z]ettelkasten [G]rep' })
-- treesitter -- treesitter
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
ensure_installed = { 'lua', 'typescript', 'rust', 'go', 'python', 'prisma' }, ensure_installed = {
'tsx', 'toml', 'lua', 'typescript', 'rust', 'go', 'yaml', 'json', 'php', 'css',
'python', 'prisma', 'html', "dockerfile"
},
sync_install = false, sync_install = false,
highlight = { enable = true }, highlight = { enable = true },
indent = { enable = true }, indent = { enable = true },
@ -238,6 +255,10 @@ require('nvim-autopairs').setup {
check_ts = true, check_ts = true,
} }
local parser_config = require('nvim-treesitter.parsers').get_parser_configs()
parser_config.tsx.filetype_to_parsername = {"javascript", "typescript.tsx"}
require('guess-indent').setup { require('guess-indent').setup {
auto_cmd = true, -- Set to false to disable automatic execution auto_cmd = true, -- Set to false to disable automatic execution
filetype_exclude = { -- A list of filetypes for which the auto command gets disabled filetype_exclude = { -- A list of filetypes for which the auto command gets disabled