Skip to main content

Chili Pepper Language Linter, Formatter, and Language Server, written in Rust.

Project description

Chiz

Chili & Pepper Language Analyzer, provides Linter, Formatter, and Language Server for chili, a spicy language and runtime for data analysis and engineering

Language Server

  • hover
  • rename symbol
  • go to definition
  • go to reference
  • workspace symbol
  • document highlight
  • document symbol
  • completion
  • signature help
  • semantic highlights
  • call hierarchy

Installation

pip install chiz

Neovim Configuration

Create a ~/.config/nvim/lua/chiz.lua file and add the following code, then include require("chiz") in the init.lua file.

local cmp = require 'cmp'
cmp.setup({
  sources = cmp.config.sources({
    { name = 'nvim_lsp' },
    { name = 'vsnip' },
    { name = 'buffer' },
  }),
  window = {
    completion = cmp.config.window.bordered(),
  },
  mapping = cmp.mapping.preset.insert({
    ['<C-b>'] = cmp.mapping.scroll_docs(-4),
    ['<C-f>'] = cmp.mapping.scroll_docs(4),
    ['<C-Space>'] = cmp.mapping.complete(),
    ['<C-e>'] = cmp.mapping.abort(),
    ['<CR>'] = cmp.mapping.confirm({ select = true }),
  }),
  completion = {
    keyword_length = 2,
  }
})

vim.api.nvim_create_autocmd('FileType', {
  pattern = { "chi", "pep" },
  callback = function()
    vim.lsp.start({
      name = 'chili language server',
      cmd = { 'chiz', 'server' },
      filetypes = { 'chi', 'pep' },
      root_dir = vim.fs.dirname(vim.fs.find({ 'src' }, { upward = true })[1]),
    })
    local group = vim.api.nvim_create_augroup("LSPDocumentHighlight", {})
    vim.opt.updatetime = 1000
    vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
			buffer = bufnr,
			group = group,
			callback = function()
				vim.lsp.buf.document_highlight()
			end,
		})
    vim.api.nvim_create_autocmd({ "CursorMoved" }, {
			buffer = bufnr,
			group = group,
			callback = function()
				vim.lsp.buf.clear_references()
			end,
		})
  end,
})

vim.api.nvim_create_autocmd('LspAttach', {
  group = vim.api.nvim_create_augroup('UserLspConfig', {}),
  callback = function(ev)
    vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
    local opts = { buffer = ev.buf }
    vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
    vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
    vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
    vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
    vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
    vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
    vim.keymap.set('n', '<space>wl', function()
      print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
    end, opts)
    vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
    vim.keymap.set('n', '<space>f', function()
      vim.lsp.buf.format { async = true }
    end, opts)
  end,
})

-- Create an augroup to manage the autocmd
local lsp_augroup = vim.api.nvim_create_augroup("LspFormatting", { clear = true })

-- Apply formatting before saving the buffer
vim.api.nvim_create_autocmd("BufWritePre", {
  group = lsp_augroup,
  callback = function()
    vim.lsp.buf.format({ async = false })
  end,
})

Helix Configuration

Pending...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

chiz-0.7.0-py3-none-win_amd64.whl (1.4 MB view details)

Uploaded Python 3Windows x86-64

chiz-0.7.0-py3-none-win32.whl (1.3 MB view details)

Uploaded Python 3Windows x86

chiz-0.7.0-py3-none-musllinux_1_2_x86_64.whl (1.7 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

chiz-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

chiz-0.7.0-py3-none-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

chiz-0.7.0-py3-none-macosx_10_12_x86_64.whl (1.5 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file chiz-0.7.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: chiz-0.7.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chiz-0.7.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2f689c669055279f9ae437d5edd6d1075b6941dd6bb6ed0f97bffd58675dbb2b
MD5 ff6419e9f95b42bd28d9d61c2e25f3bb
BLAKE2b-256 7de12eed6de452b2e31c8f28520aedbc161a81aca9d8baeee064b6bb42dfa1c3

See more details on using hashes here.

File details

Details for the file chiz-0.7.0-py3-none-win32.whl.

File metadata

  • Download URL: chiz-0.7.0-py3-none-win32.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chiz-0.7.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 4ce2521e015382e5c9d7fd600d1b13eb8f2e6b27d6cbc394867306b93b2c5673
MD5 1e4cffe75ae7b5ce15eb233cb3935c18
BLAKE2b-256 e9e875d8a8c221d6220e5d93da4a67464a6addb45a9978312330b643cc4681f2

See more details on using hashes here.

File details

Details for the file chiz-0.7.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

  • Download URL: chiz-0.7.0-py3-none-musllinux_1_2_x86_64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: Python 3, musllinux: musl 1.2+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chiz-0.7.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fa794da83c7e92d8c628b24c4aebc57b5394f9297acf498266bd29f44424ddf0
MD5 6c901871f7a3847dc6022696068a25a2
BLAKE2b-256 39ddbd94379a12f02e9c46c19903aae651282d712a61a0695288e6d821c0c88f

See more details on using hashes here.

File details

Details for the file chiz-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: chiz-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chiz-0.7.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5404afe180caaa1a309b79bfcfed3a63ef6ee8d954646689f598aeec07f54c54
MD5 49309b52d3f80c71f3d4a707866d7a52
BLAKE2b-256 0bbcd64d1a46e4c0b39fada13563708c0d71c9f0340e7878499dec7496961f56

See more details on using hashes here.

File details

Details for the file chiz-0.7.0-py3-none-macosx_11_0_arm64.whl.

File metadata

  • Download URL: chiz-0.7.0-py3-none-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chiz-0.7.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e4cbfae24882ffea933d8b3a457ec857c4318f0dbf945e0eee52013487289ff0
MD5 87c09d4b1228f9ac652e9ee24c66fe53
BLAKE2b-256 abecc9224cbf8f30036a2e26b0f8090b08fef00eb382efb0453c25f4d1815422

See more details on using hashes here.

File details

Details for the file chiz-0.7.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: chiz-0.7.0-py3-none-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chiz-0.7.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fc4357c419c58b77c695d255619edbf71df828ce11789b5405ba632383922f64
MD5 df9c4b2b815a297165968757664eb7fd
BLAKE2b-256 e80fcaa0878f5f6a23f96c58e028da1aa68af2919b4971e5d7173b9ecac426fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page